aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgit-bruh <prathamIN@proton.me>2024-04-08 01:15:44 +0530
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-09 20:10:05 +0100
commit2856237810f2e8185b28318d6ed522321f09286c (patch)
treeecdb3dfab5294ea76f81d340f0bab5fb386c8e02
parent386ccd3213adc34ab9e56bb1b99160672771f064 (diff)
downloadvis-lspc-2856237810f2e8185b28318d6ed522321f09286c.tar.gz
vis-lspc-2856237810f2e8185b28318d6ed522321f09286c.zip
supported-servers: update roots
-rw-r--r--supported-servers.lua40
1 files changed, 35 insertions, 5 deletions
diff --git a/supported-servers.lua b/supported-servers.lua
index 67ac5f6..0cfe1fd 100644
--- a/supported-servers.lua
+++ b/supported-servers.lua
@@ -20,10 +20,15 @@ local source_path = source_str:match('(.*/)')
local lspc = dofile(source_path .. 'lspc.lua')
-local clangd = {name = 'clangd', cmd = 'clangd'}
+local clangd = {
+ name = 'clangd',
+ cmd = 'clangd',
+ roots = {'compile_commands.json', '.clangd'},
+}
local typescript = {
name = 'typescript',
cmd = 'typescript-language-server --stdio',
+ roots = {'package.json', 'tsconfig.json', 'jsconfig.json'},
}
return {
@@ -32,7 +37,11 @@ return {
ansi_c = clangd,
-- pylsp (python-lsp-server) language server configuration
-- https://github.com/python-lsp/python-lsp-server
- python = {name = 'python-lsp-server', cmd = 'pylsp'},
+ python = {
+ name = 'python-lsp-server',
+ cmd = 'pylsp',
+ roots = {'requirements.txt', 'setup.py'},
+ },
-- lua (lua-language-server) language server configuration
-- https://github.com/sumneko/lua-language-server
lua = {
@@ -51,18 +60,35 @@ return {
dart = {
name = 'dart',
cmd = 'dart language-server --client-id vis-lspc --client-version ' .. lspc.version,
+ roots = {'pubspec.yaml'},
},
-- haskell (haskell-language-server)
-- https://github.com/haskell/haskell-language-server
- haskell = {name = 'haskell', cmd = 'haskell-language-server-wrapper --lsp'},
+ haskell = {
+ name = 'haskell',
+ cmd = 'haskell-language-server-wrapper --lsp',
+ roots = {'hie.yaml', 'cabal.project', 'Setup.hs', 'stack.yaml', '*.cabal'},
+ },
-- ocaml (ocaml-language-server)
-- https://github.com/ocaml/ocaml-lsp
- caml = {name = 'ocaml', cmd = 'ocamllsp'},
+ caml = {
+ name = 'ocaml',
+ cmd = 'ocamllsp',
+ roots = {
+ 'dune-workspace',
+ 'dune-project',
+ 'Makefile',
+ 'opam',
+ '*.opam',
+ 'esy.json',
+ 'dune',
+ },
+ },
-- go (gopls)
-- https://github.com/golang/tools/tree/master/gopls
- go = {name = 'go', cmd = 'gopls'},
+ go = {name = 'go', cmd = 'gopls', roots = {'Gopkg.toml', 'go.mod'}},
-- bash (bash-language-server)
-- https://github.com/bash-lsp/bash-language-server
@@ -88,4 +114,8 @@ return {
name = 'json-language-server',
cmd = 'vscode-json-language-server --stdio',
},
+
+ -- rust (rust-analyzer)
+ -- https://github.com/rust-lang/rust-analyzer
+ rust = {name = 'rust', cmd = 'rust-analyzer', roots = {'Cargo.toml'}},
}