]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/lsp.vim
Proper quotes
[dotfiles.git] / vim / .vim / plugin / lsp.vim
index e0350190cf7da022e5ba6530dabf88da4af1fe67..6820777cf7e588361273cc8c9601bce84eb81952 100644 (file)
@@ -1,7 +1,7 @@
 vim9script
 
 # go get golang.org/x/tools/gopls@latest
-# pip install 'python-language-server[all]'
+# pip install "python-language-server[all]"
 
 var lspServers: list<dict<any>>
 
@@ -12,7 +12,7 @@ for d in [
         args: ["--log=error"],
     },
     {
-        filetype: ["go"],
+        filetype: ["go", "gomod"],
         path: "gopls",
         syncInit: true,
     },
@@ -43,6 +43,7 @@ var lspOpts = {
 
 autocmd VimEnter * call LspAddServer(lspServers)
 autocmd VimEnter * call LspOptionsSet(lspOpts)
+autocmd CursorMoved * silent! LspDiagCurrent
 nmap gd :LspGotoDefinition<CR>
 nmap <C-W>gd :vert LspGotoDefinition<CR>
 nmap <F6> :lopen<CR>