2018-07-13 12:08:08 -05:00
|
|
|
scriptencoding utf8
|
|
|
|
|
2018-10-31 14:40:57 -05:00
|
|
|
" configuration for language servers
|
|
|
|
let g:LanguageClient_serverCommands = {
|
|
|
|
\ 'rust': ['rustup', 'run', 'stable', 'rls'],
|
|
|
|
\ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
|
|
|
|
\ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
|
|
|
|
\ 'haskell': ['/usr/bin/hie-wrapper'],
|
|
|
|
\ 'python': ['/usr/local/bin/pyls'],
|
|
|
|
\ }
|
|
|
|
|
|
|
|
let g:LanguageClient_serverCommands = {}
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" fix neovim cursor
|
|
|
|
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 1
|
|
|
|
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
|
|
|
|
" line number defaults
|
|
|
|
set nonumber
|
|
|
|
set norelativenumber
|
|
|
|
|
|
|
|
" different settings if using vim as a manpage viewer
|
|
|
|
" if exists('asmanviewer')
|
|
|
|
" set nonumber " no line numbers when viewing a man page
|
|
|
|
" set norelativenumber " no line numbers when viewing a man page
|
|
|
|
" else
|
|
|
|
" set nonumber " line numbers
|
|
|
|
" set norelativenumber " line numbers
|
|
|
|
" endif
|
2017-12-21 12:19:25 -06:00
|
|
|
|
|
|
|
" use tabs at a two-space width
|
|
|
|
set tabstop=2
|
|
|
|
set shiftwidth=2
|
|
|
|
set softtabstop=2
|
|
|
|
set noexpandtab
|
|
|
|
|
|
|
|
" auto/smart indent
|
|
|
|
set autoindent smartindent
|
|
|
|
|
|
|
|
" show certain whitespace characters
|
|
|
|
set list
|
|
|
|
set nostartofline
|
|
|
|
set listchars=trail:·,tab:\ \ ,trail:~
|
|
|
|
" set listchars=eol:\ ,tab:>-,trail:~,extends:>,precedes:<,space:·
|
|
|
|
|
|
|
|
" try and keep text (and code) to a width of 80 characters
|
|
|
|
set wrap
|
|
|
|
set linebreak
|
|
|
|
set breakindent
|
|
|
|
set textwidth=80
|
2018-07-13 12:08:08 -05:00
|
|
|
set formatoptions=crql1j " :h fo-table
|
2017-12-21 12:19:25 -06:00
|
|
|
|
|
|
|
" handle window title
|
|
|
|
set title
|
|
|
|
|
|
|
|
" don't do syntax highlighting on lines longer than 2048 characters
|
|
|
|
set synmaxcol=2048
|
|
|
|
|
|
|
|
" don't highlight the current line
|
|
|
|
set nocursorline
|
|
|
|
|
|
|
|
" set cursorcolumn " highlight the current column
|
|
|
|
" let &colorcolumn=join(range(81,400),",") " colors columns past 80
|
|
|
|
|
|
|
|
" highlight the 81st character in a line where it exists
|
|
|
|
highlight ColorColumn ctermbg=magenta ctermfg=7
|
|
|
|
call matchadd('ColorColumn', '\%81v', 100)
|
|
|
|
|
|
|
|
set noshowcmd
|
|
|
|
set nowildmenu
|
|
|
|
set wildmode=longest,list,full
|
|
|
|
set cpoptions-=$
|
|
|
|
set showmatch
|
|
|
|
set mouse=a
|
|
|
|
set mousehide
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
set noruler
|
|
|
|
set lazyredraw
|
|
|
|
set scrolloff=8
|
|
|
|
set sidescrolloff=8
|
|
|
|
set splitright
|
|
|
|
set splitbelow
|
|
|
|
set noerrorbells
|
|
|
|
set visualbell
|
|
|
|
set nobackup
|
|
|
|
set nowritebackup
|
|
|
|
set noswapfile
|
|
|
|
set timeout
|
|
|
|
set ttimeoutlen=200
|
|
|
|
set isfname+=32
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" no freakin' bell
|
|
|
|
set visualbell t_vb=
|
2017-12-21 12:19:25 -06:00
|
|
|
if has('autocmd')
|
2018-07-13 12:08:08 -05:00
|
|
|
augroup DisableVisualVell
|
|
|
|
autocmd GUIEnter * set visualbell t_vb=
|
|
|
|
augroup END
|
2017-12-21 12:19:25 -06:00
|
|
|
endif
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" color scheme
|
2017-12-21 12:19:25 -06:00
|
|
|
let base16colorspace=256
|
|
|
|
set background=dark
|
2018-07-13 12:08:08 -05:00
|
|
|
syntax enable
|
2017-12-21 12:19:25 -06:00
|
|
|
colorscheme base16-donokai
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" hide stuff
|
2017-12-21 12:19:25 -06:00
|
|
|
highlight SignColumn ctermbg=black guibg=black
|
|
|
|
highlight GitGutterAdd ctermbg=black guibg=black
|
|
|
|
highlight GitGutterDelete ctermbg=black guibg=black
|
|
|
|
highlight GitGutterChange ctermbg=black guibg=black
|
|
|
|
highlight GitGutterChangeDelete ctermbg=black guibg=black
|
|
|
|
|
|
|
|
hi NonText ctermfg=black guifg=black
|
|
|
|
|
|
|
|
set hidden " allows buffer switching without saving
|
|
|
|
set shortmess=Ia
|
|
|
|
set history=1000
|
|
|
|
|
|
|
|
" undo files
|
|
|
|
set undofile
|
|
|
|
set undodir=$vimdir/undo
|
|
|
|
set undolevels=1000
|
|
|
|
set undoreload=10000
|
|
|
|
|
|
|
|
" backup files
|
|
|
|
set backupdir=$vimdir/backup
|
|
|
|
set directory=$vimdir/backup
|
|
|
|
|
|
|
|
" spell file
|
|
|
|
set spellfile=$vimdir/spell/en.utf-8.add
|
|
|
|
|
|
|
|
" smart case insensitivity by default
|
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
set incsearch
|
|
|
|
set hlsearch
|
|
|
|
set wrapscan
|
|
|
|
|
|
|
|
set foldmethod=syntax
|
|
|
|
set foldlevel=99
|
|
|
|
set foldnestmax=10
|
|
|
|
set foldlevelstart=0
|
|
|
|
|
|
|
|
set autowrite
|
|
|
|
set autochdir
|
|
|
|
set autoread
|
|
|
|
set nomodeline
|
|
|
|
set noshowmode
|
|
|
|
set noshowcmd
|
|
|
|
|
|
|
|
set laststatus=0
|
|
|
|
|
|
|
|
" yank to OS clipboard
|
|
|
|
set clipboard+=unnamed
|
|
|
|
|
|
|
|
set nofoldenable
|
|
|
|
setlocal nofoldenable
|
|
|
|
|
|
|
|
" no empty buffer on startup
|
2018-07-13 12:08:08 -05:00
|
|
|
augroup DisableEmptyBuffer
|
|
|
|
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
|
|
|
|
augroup END
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" modify higlight colors
|
|
|
|
hi Search cterm=NONE ctermbg=blue ctermfg=black
|
|
|
|
highlight LineNr ctermbg=none ctermfg=8
|
|
|
|
highlight CursorLineNr ctermbg=18 ctermfg=gray
|
|
|
|
hi IndentGuidesEven ctermbg=18
|