Do not use vim-lsp-settings for simplicity
authorSergey Matveev <stargrave@stargrave.org>
Sun, 12 Jul 2020 16:04:51 +0000 (19:04 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 12 Jul 2020 16:32:49 +0000 (19:32 +0300)
vim/.vim/ftplugin/c/lsp.vim [new file with mode: 0644]
vim/.vim/ftplugin/go/lsp.vim [new file with mode: 0644]
vim/.vim/ftplugin/python/lsp.vim [new file with mode: 0644]
vim/.vim/plugin/lsp.vim

diff --git a/vim/.vim/ftplugin/c/lsp.vim b/vim/.vim/ftplugin/c/lsp.vim
new file mode 100644 (file)
index 0000000..878b7a8
--- /dev/null
@@ -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 (file)
index 0000000..92614c6
--- /dev/null
@@ -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 (file)
index 0000000..4c04cd2
--- /dev/null
@@ -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
index 104f1d10f1e7fef43f3d9849e1f9a3c72687e560..621548b542491a19c5fe41be7b5dcf0879840375 100644 (file)
@@ -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 <C-@> <Plug>(asyncomplete_force_refresh)
+imap <C-b> <Plug>(asyncomplete_force_refresh)
 
 let g:lsp_highlight_references_enabled = 1
 let g:lsp_diagnostics_echo_cursor = 1