From abeca38b2bf8282f0ad673286bc51fbaf59d27f2 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 12 Jul 2020 19:04:51 +0300 Subject: [PATCH] Do not use vim-lsp-settings for simplicity --- vim/.vim/ftplugin/c/lsp.vim | 5 +++++ vim/.vim/ftplugin/go/lsp.vim | 5 +++++ vim/.vim/ftplugin/python/lsp.vim | 8 ++++++++ vim/.vim/plugin/lsp.vim | 7 +------ 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 vim/.vim/ftplugin/c/lsp.vim create mode 100644 vim/.vim/ftplugin/go/lsp.vim create mode 100644 vim/.vim/ftplugin/python/lsp.vim 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 -- 2.44.0