nvim/init.vim

50 lines
1.4 KiB
VimL

set runtimepath^=~/.config/vim runtimepath+=~/.config/vim/after
let &packpath = &runtimepath
source ~/.config/vim/vimrc
" set ruby program to global one. Need to investigate if this will cause
" problems if I ever use ruby virtual environments or RVM or similar.
let g:ruby_host_prog = '~/.gem/ruby/2.6.0/bin/neovim-ruby-host'
" TODO - try 'coc-tsserver'
call coc#add_extension( 'coc-vetur', 'coc-python', 'coc-phpls', 'coc-json', 'coc-css', 'coc-prettier', 'coc-eslint', 'coc-vimlsp', 'coc-tsserver')
" source ~/.config/nvim/init.statusline.vim
source ~/.config/nvim/init.tabline.vim
set statusline+=\ nvim\
" set foldtext=foldtext()
set fillchars=stl:\ ,stlnc:\ ,vert:┃,fold:\
"auto_window_settings {{{
function! WinEnterColorColumn() abort"{{{
if &buftype != ''
setlocal colorcolumn=0
elseif exists('b:colorcolumn_restore')
execute 'setlocal colorcolumn=' . b:colorcolumn_restore
endif
endfunction
"}}}
function! WinLeaveColorColumn() abort"{{{
let b:colorcolumn_restore = &colorcolumn
setlocal colorcolumn=0
endfunction
"}}}
augroup auto_window_settings "{{{
autocmd!
autocmd WinEnter * call WinEnterColorColumn()
autocmd WinEnter * set cursorline | set cursorcolumn
" autocmd WinLeave * setlocal colorcolumn=0
autocmd WinLeave * call WinLeaveColorColumn()
autocmd WinLeave * set nocursorline | set nocursorcolumn
augroup END
"}}} augroup auto_window_settings
" }}} auto_window_settings
" vim: set foldmethod=marker: