X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Flsp.vim;fp=vim%2F.vim%2Fplugin%2Flsp.vim;h=532b5e02b20028473a4f6e30f9c341a4c89bb6a2;hp=0000000000000000000000000000000000000000;hb=01fb86734d5d83bfc44978d9ebf0927f5a37944e;hpb=50c727abbb918becd61df61de534dacc2d54ddc1 diff --git a/vim/.vim/plugin/lsp.vim b/vim/.vim/plugin/lsp.vim new file mode 100644 index 0000000..532b5e0 --- /dev/null +++ b/vim/.vim/plugin/lsp.vim @@ -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": "gd", + \ "ShowHover": v:true, + \ "Completion": "omnifunc", +\ } + +map :LSClientAllDiagnostics