]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/lsp.vim
Proper quotes
[dotfiles.git] / vim / .vim / plugin / lsp.vim
index 41791c985d730b7a20d76fbbb181cf0bfb407735..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,
     },
@@ -38,11 +38,12 @@ var lspOpts = {
     autoComplete: false,
     autoHighlight: true,
     autoPopulateDiags: true,
-    showInlayHints: true,
+    showSignature: false,
 }
 
 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>