aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/lsp.vim
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-11-27 23:43:31 +0800
committerGuangxiong Lin <[email protected]>2022-11-27 23:43:31 +0800
commitf30bb49ae406789d1e245000d65a6337950251b9 (patch)
treeacff7273de7cec49b43924d09f2ac9493e5e5db7 /.vim/after/plugin/lsp.vim
parent4e81a35dcb0b97beafe96116d2c9f2d64a2648c6 (diff)
downloaddotfiles-f30bb49ae406789d1e245000d65a6337950251b9.tar.gz
dotfiles-f30bb49ae406789d1e245000d65a6337950251b9.tar.bz2
dotfiles-f30bb49ae406789d1e245000d65a6337950251b9.zip
Add rust lsp vim
Diffstat (limited to '.vim/after/plugin/lsp.vim')
-rw-r--r--.vim/after/plugin/lsp.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim
index 5020427..258e3f7 100644
--- a/.vim/after/plugin/lsp.vim
+++ b/.vim/after/plugin/lsp.vim
@@ -62,6 +62,14 @@ if executable('zk')
\ })
endif
+if executable('rust-analyzer')
+ au User lsp_setup call lsp#register_server({
+ \ 'name': 'rust-analyzer',
+ \ 'cmd': {server_info->['rust-analyzer']},
+ \ 'allowlist': ['rust'],
+ \ })
+endif
+
function! s:on_lsp_buffer_enabled() abort
setlocal omnifunc=lsp#complete
setlocal nocscopetag