From f30bb49ae406789d1e245000d65a6337950251b9 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 27 Nov 2022 23:43:31 +0800 Subject: Add rust lsp vim --- .vim/after/plugin/lsp.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.vim/after/plugin') 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 -- cgit v1.2.3