From: Sergey Matveev Date: Sun, 12 Jul 2020 16:04:51 +0000 (+0300) Subject: Do not use vim-lsp-settings for simplicity X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=abeca38b2bf8282f0ad673286bc51fbaf59d27f2 Do not use vim-lsp-settings for simplicity --- diff --git a/vim/.vim/ftplugin/c/lsp.vim b/vim/.vim/ftplugin/c/lsp.vim new file mode 100644 index 0000000..878b7a8 --- /dev/null +++ b/vim/.vim/ftplugin/c/lsp.vim @@ -0,0 +1,5 @@ +au User lsp_setup call lsp#register_server({ +\ "name": "clangd", +\ "cmd": ["clangd60"], +\ "whitelist": ["c", "cpp", "objc", "objcpp"], +\}) diff --git a/vim/.vim/ftplugin/go/lsp.vim b/vim/.vim/ftplugin/go/lsp.vim new file mode 100644 index 0000000..92614c6 --- /dev/null +++ b/vim/.vim/ftplugin/go/lsp.vim @@ -0,0 +1,5 @@ +au User lsp_setup call lsp#register_server({ +\ "name": "gopls", +\ "cmd": ["gopls"], +\ "whitelist": ["go"], +\}) diff --git a/vim/.vim/ftplugin/python/lsp.vim b/vim/.vim/ftplugin/python/lsp.vim new file mode 100644 index 0000000..4c04cd2 --- /dev/null +++ b/vim/.vim/ftplugin/python/lsp.vim @@ -0,0 +1,8 @@ +if executable("pyls") + " pip install python-language-server + au User lsp_setup call lsp#register_server({ + \ "name": "pyls", + \ "cmd": {server_info->["pyls"]}, + \ "whitelist": ["python"], + \}) +endif diff --git a/vim/.vim/plugin/lsp.vim b/vim/.vim/plugin/lsp.vim index 104f1d1..621548b 100644 --- a/vim/.vim/plugin/lsp.vim +++ b/vim/.vim/plugin/lsp.vim @@ -1,11 +1,6 @@ -let g:lsp_settings_enable_suggestions = 0 -let g:lsp_settings = { -\ 'clangd': {'cmd': ['clangd60']}, -\} - let g:asyncomplete_auto_completeopt = 0 let g:asyncomplete_auto_popup = 0 -imap (asyncomplete_force_refresh) +imap (asyncomplete_force_refresh) let g:lsp_highlight_references_enabled = 1 let g:lsp_diagnostics_echo_cursor = 1