summaryrefslogtreecommitdiffstats
path: root/vim/files/vimrc
diff options
context:
space:
mode:
authoryushyin <yushyin@saga>2020-12-14 03:12:38 +0100
committeryushyin <yushyin@saga>2020-12-14 03:12:38 +0100
commitfe9cfa904195fec45446fc8ba693a43d0d519be5 (patch)
tree367e364e8359ef2c08f647195989d42e79d147ed /vim/files/vimrc
parent62f5b430569d8a52f1b136f4b858e380dd1c8da5 (diff)
downloaddotfiles-igor-fe9cfa904195fec45446fc8ba693a43d0d519be5.tar.gz
dotfiles-igor-fe9cfa904195fec45446fc8ba693a43d0d519be5.tar.xz
Vim: Set omnifunc for every lsp enabled buffer
Diffstat (limited to 'vim/files/vimrc')
-rw-r--r--vim/files/vimrc11
1 files changed, 10 insertions, 1 deletions
diff --git a/vim/files/vimrc b/vim/files/vimrc
index 4677b0f..c79c016 100644
--- a/vim/files/vimrc
+++ b/vim/files/vimrc
@@ -119,7 +119,6 @@ if dein#tap('vim-lsp')
\ 'whitelist': ['rust'],
\ })
- au FileType rust setl omnifunc=lsp#complete
endif
if executable('ghcide')
au User lsp_setup call lsp#register_server({
@@ -129,6 +128,16 @@ if dein#tap('vim-lsp')
\ })
endif
+ function! s:on_lsp_buffer_enabled() abort
+ setl omnifunc=lsp#complete
+ setl signcolumn=yes
+ endfunction
+
+ augroup lsp_install
+ au!
+ au User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
+ augroup end
+
nnoremap [Lsp] <Nop>
nmap <leader>l [Lsp]