diff options
-rw-r--r-- | pkgs/custom-neovim/asset/rc.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/custom-neovim/asset/rc.vim b/pkgs/custom-neovim/asset/rc.vim index eebe6b4..5b1cac5 100644 --- a/pkgs/custom-neovim/asset/rc.vim +++ b/pkgs/custom-neovim/asset/rc.vim @@ -128,3 +128,17 @@ let g:localvimrc_persistent = 2 let g:wordmotion_prefix = '<Leader>' nmap <S-w> <Leader>w + +" spinning up a language client only makes +" sense if such a client is available +if executable('cquery') + let g:LanguageClient_serverCommands = { 'cpp': ['cquery'] } + let g:LanguageClient_hoverPreview = "Never" + + set completefunc=LanguageClient#complete + set completeopt-=preview + + inoremap <C-n> <C-x><C-o> + " allow completion selection via CR without inserting a new line + imap <expr><CR> pumvisible() ? "\<C-y>" : "\<CR>" +endif |