add nimlsp, always load plugin

Sun, 17 May 2020 01:08:28 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 17 May 2020 01:08:28 -0500
changeset 860
60667f14090c
parent 859
9cd1d19d8cc6
child 861
8e6131020307

add nimlsp, always load plugin

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -34,10 +34,8 @@ let s:filename   = expand('<sfile>')
   Plug 'lifepillar/vim-mucomplete'
   Plug 'tpope/vim-endwise'
 
-  if executable('rls') || executable('gopls')
-    Plug 'prabirshrestha/async.vim'
-    Plug 'prabirshrestha/vim-lsp'
-  end
+  Plug 'prabirshrestha/async.vim'
+  Plug 'prabirshrestha/vim-lsp'
 
   Plug 'vimwiki/vimwiki'
 
@@ -350,11 +348,20 @@ augroup vim-lsp
   if executable('gopls')
     autocmd FileType go setlocal omnifunc=lsp#complete
     autocmd User lsp_setup call lsp#register_server({
-      \ 'name': 'go-lang',
+      \ 'name': 'gopls',
       \ 'cmd': {server_info->['gopls']},
       \ 'whitelist': ['go'],
       \})
   endif
+
+  if executable('nimlsp')
+    autocmd FileType nim setlocal omnifunc=lsp#complete
+    autocmd User lsp_setup call lsp#register_server({
+      \ 'name': 'nimlsp',
+      \ 'cmd': {server_info->['nimlsp']},
+      \ 'whitelist': ['nim'],
+      \})
+  endif
 augroup END
 
 ">> Vimwiki

mercurial