# 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",
{
filetype: ["python"],
path: "pyls",
- args: ["-v"],
syncInit: true,
workspaceConfig: {pyls: {
configurationSources: ["flake8"],
mccabe: {enabled: false},
},
}},
- }
+ },
]
+ if executable(d["path"])
+ add(lspServers, d)
+ endif
+endfor
+
var lspOpts = {
ignoreMissingServer: true,
autoComplete: false,
autoHighlight: true,
autoPopulateDiags: true,
showInlayHints: true,
+ showSignature: false,
}
autocmd VimEnter * call LspAddServer(lspServers)