vim: enable coc only for v8.0 and up

This commit is contained in:
2020-02-05 12:29:06 +00:00
parent e8d47876bc
commit 33066712df

10
vimrc
View File

@@ -23,11 +23,9 @@ call plug#begin('~/.vim/plugged')
Plug 'wesQ3/vim-windowswap'
Plug 'majutsushi/tagbar'
" be sure to read full install instructions. this still needs
" you to cd ~/.vim/plugged/YouCompleteMe
" python ./install.py --js-completer
" Plug 'Valloric/YouCompleteMe'
if version >= 800
Plug 'neoclide/coc.nvim', {'branch': 'release'}
endif
Plug 'dense-analysis/ale'
Plug 'tpope/vim-commentary'
@@ -153,6 +151,7 @@ augroup filetype
au bufRead,BufNewFile *.cpp set filetype=cpp
au bufRead,BufNewFile *.inc set filetype=make
au BufRead,BufNewFile *.eex set filetype=html
au BufRead,BufNewFile *.bss set filetype=vb
augroup END
augroup cppprog
@@ -432,6 +431,8 @@ endfunction
nnoremap <silent> <leader>wst :call ToggleWindowHorizontalVerticalSplit()<cr>
" inoremap <lt>/ </<C-x><C-o><Esc>==gi
" COC configuration
if version >= 800
" if hidden is not set, TextEdit might fail.
set hidden
@@ -560,6 +561,7 @@ nnoremap <silent> <space>j :<C-u>CocNext<CR>
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
endif
nmap <Tab> :><CR>
vmap <Tab> :><CR>