diff options
author | yushyin <yushyin@saga> | 2020-12-14 03:12:38 +0100 |
---|---|---|
committer | yushyin <yushyin@saga> | 2020-12-14 03:12:38 +0100 |
commit | fe9cfa904195fec45446fc8ba693a43d0d519be5 (patch) | |
tree | 367e364e8359ef2c08f647195989d42e79d147ed /vim | |
parent | 62f5b430569d8a52f1b136f4b858e380dd1c8da5 (diff) | |
download | dotfiles-igor-fe9cfa904195fec45446fc8ba693a43d0d519be5.tar.gz dotfiles-igor-fe9cfa904195fec45446fc8ba693a43d0d519be5.tar.xz |
Vim: Set omnifunc for every lsp enabled buffer
Diffstat (limited to 'vim')
-rw-r--r-- | vim/files/after/ftplugin/c.vim | 5 | ||||
-rw-r--r-- | vim/files/after/ftplugin/haskell.vim | 1 | ||||
-rw-r--r-- | vim/files/vimrc | 11 |
3 files changed, 10 insertions, 7 deletions
diff --git a/vim/files/after/ftplugin/c.vim b/vim/files/after/ftplugin/c.vim deleted file mode 100644 index 2e39262..0000000 --- a/vim/files/after/ftplugin/c.vim +++ /dev/null @@ -1,5 +0,0 @@ -if dein#tap('vim-lsp') - if executable('ccls') - setl omnifunc=lsp#complete - endif -endif diff --git a/vim/files/after/ftplugin/haskell.vim b/vim/files/after/ftplugin/haskell.vim deleted file mode 100644 index eb4194c..0000000 --- a/vim/files/after/ftplugin/haskell.vim +++ /dev/null @@ -1 +0,0 @@ -setl omnifunc=lsp#complete 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] |