]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/lsp.vim
C headers
[dotfiles.git] / vim / .vim / plugin / lsp.vim
index 41791c985d730b7a20d76fbbb181cf0bfb407735..9a764211bfcf25a141a6731c8eadc05229ea6ac3 100644 (file)
@@ -1,18 +1,18 @@
 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>>
 
 for d in [
     {
-        filetype: ["c", "cpp"],
+        filetype: ["c", "ch", "cpp"],
         path: "clangd",
         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>