summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-03-03 21:11:50 +0100
committerAdrian Kummerlaender2019-03-03 21:11:50 +0100
commit92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8 (patch)
tree9888f6e49e476cfeb326fbdc1d17a697a80571a8
parenta9ceae32286b080797e92fe4725ea1280fbc85d9 (diff)
downloadpkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.tar
pkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.tar.gz
pkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.tar.bz2
pkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.tar.lz
pkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.tar.xz
pkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.tar.zst
pkgs-92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8.zip
Add basic language client config
-rw-r--r--pkgs/custom-neovim/asset/rc.vim14
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