projects
/
dotfiles.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52bdc1b
)
Add LSP server only if executable exists
author
Sergey Matveev <stargrave@stargrave.org>
Tue, 31 Jan 2023 21:49:23 +0000 (
00:49
+0300)
committer
Sergey Matveev <stargrave@stargrave.org>
Tue, 31 Jan 2023 21:49:23 +0000 (
00:49
+0300)
vim/.vim/plugin/lsp.vim
patch
|
blob
|
history
diff --git
a/vim/.vim/plugin/lsp.vim
b/vim/.vim/plugin/lsp.vim
index ad6d0a51b508aece1db2fe11e8b7399ac4b75bed..41791c985d730b7a20d76fbbb181cf0bfb407735 100644
(file)
--- a/
vim/.vim/plugin/lsp.vim
+++ b/
vim/.vim/plugin/lsp.vim
@@
-3,7
+3,9
@@
vim9script
# go get golang.org/x/tools/gopls@latest
# pip install 'python-language-server[all]'
-var lspServers = [
+var lspServers: list<dict<any>>
+
+for d in [
{
filetype: ["c", "cpp"],
path: "clangd",
@@
-24,8
+26,13
@@
var lspServers = [
mccabe: {enabled: false},
},
}},
- }
+ }
,
]
+ if executable(d["path"])
+ add(lspServers, d)
+ endif
+endfor
+
var lspOpts = {
ignoreMissingServer: true,
autoComplete: false,