support go-langserver

Fri, 17 Aug 2018 00:51:15 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 17 Aug 2018 00:51:15 -0500
changeset 718
30888d15e6ee
parent 717
aa75c68ba540
child 719
490da8798a6a

support go-langserver

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -328,12 +328,21 @@ augroup vim-lsp
 
   if executable('rls')
     autocmd FileType rust setlocal omnifunc=lsp#complete
-    au User lsp_setup call lsp#register_server({
+    autocmd User lsp_setup call lsp#register_server({
       \ 'name': 'rls',
       \ 'cmd': {server_info->['rustup', 'run', 'nightly', 'rls']},
       \ 'whitelist': ['rust'],
       \ })
   endif
+
+  if executable('go-langserver')
+    autocmd FileType go setlocal omnifunc=lsp#complete
+    autocmd User lsp_setup call lsp#register_server({
+      \ 'name': 'go-langserver',
+      \ 'cmd': {server_info->['go-langserver']},
+      \ 'whitelist': ['go'],
+      \})
+  endif
 augroup END
 
 ">> Vimwiki

mercurial