]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/lsp.vim
Move to vim-lsc from vim-lsp
[dotfiles.git] / vim / .vim / plugin / lsp.vim
diff --git a/vim/.vim/plugin/lsp.vim b/vim/.vim/plugin/lsp.vim
new file mode 100644 (file)
index 0000000..532b5e0
--- /dev/null
@@ -0,0 +1,26 @@
+" go get golang.org/x/tools/gopls@latest
+" pip install 'python-language-server[all]'
+
+let g:lsc_enable_autocomplete = v:false
+let g:lsc_server_commands = {
+    \ "c": {"command": "clangd --log=error"},
+    \ "cpp": {"command": "clangd --log=error"},
+    \ "go": {"command": "gopls", "log_level": "Error"},
+    \ "python": {
+    \     "command": "pyls",
+    \     "workspace_config": {"pyls": {
+    \         "configurationSources": ["flake8"],
+    \         "plugins": {
+    \             "mccabe": {"enabled": v:false},
+    \         },
+    \     }},
+    \ },
+\ }
+let g:lsc_auto_map = {
+    \ "GoToDefinition": "gd",
+    \ "GoToDefinitionSplit": "<C-W>gd",
+    \ "ShowHover": v:true,
+    \ "Completion": "omnifunc",
+\ }
+
+map <F6> :LSClientAllDiagnostics<CR>