]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/lsp.vim
exted plugin is convenient anyway
[dotfiles.git] / vim / .vim / plugin / lsp.vim
index 104f1d10f1e7fef43f3d9849e1f9a3c72687e560..1928046941157257f7e6d251d1b51478a863ada6 100644 (file)
@@ -1,24 +1,27 @@
-let g:lsp_settings_enable_suggestions = 0
-let g:lsp_settings = {
-\  'clangd': {'cmd': ['clangd60']},
-\}
+" go get golang.org/x/tools/gopls@latest
+" pip install 'python-language-server[all]'
 
-let g:asyncomplete_auto_completeopt = 0
-let g:asyncomplete_auto_popup = 0
-imap <C-@> <Plug>(asyncomplete_force_refresh)
+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": -1},
+    \ "python": {
+    \     "command": "pyls",
+    \     "workspace_config": {"pyls": {
+    \         "configurationSources": ["flake8"],
+    \         "plugins": {
+    \             "mccabe": {"enabled": v:false},
+    \         },
+    \     }},
+    \     "enabled": v:false,
+    \ },
+\ }
+let g:lsc_auto_map = {
+    \ "GoToDefinition": "gd",
+    \ "GoToDefinitionSplit": "<C-W>gd",
+    \ "ShowHover": v:true,
+    \ "Completion": "omnifunc",
+\ }
 
-let g:lsp_highlight_references_enabled = 1
-let g:lsp_diagnostics_echo_cursor = 1
-let g:lsp_diagnostics_echo_delay = -1
-
-function! s:on_lsp_buffer_enabled() abort
-    nmap <buffer> [g <Plug>(lsp-previous-diagnostic)
-    nmap <buffer> ]g <Plug>(lsp-next-diagnostic)
-    nmap <buffer> gd <plug>(lsp-definition)
-    nmap <buffer> K <plug>(lsp-hover)
-endfunction
-
-augroup lsp_install
-    autocmd!
-    autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
-augroup END
+map <F6> :LSClientAllDiagnostics<CR>