-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsupported-servers.lua
91 lines (82 loc) · 3.19 KB
/
supported-servers.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
-- Copyright (c) 2022 Florian Fischer. All rights reserved.
--
-- This file is part of vis-lspc.
--
-- vis-lspc is free software: you can redistribute it and/or modify it under the
-- terms of the GNU General Public License as published by the Free Software
-- Foundation, either version 3 of the License, or (at your option) any later
-- version.
--
-- vis-lspc is distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along with
-- vis-lspc found in the LICENSE file. If not, see <https://www.gnu.org/licenses/>.
--
-- List of supported and preconfigured language server implementations
local source_str = debug.getinfo(1, 'S').source:sub(2)
local source_path = source_str:match('(.*/)')
local lspc = dofile(source_path .. 'lspc.lua')
local clangd = {name = 'clangd', cmd = 'clangd'}
local typescript = {
name = 'typescript',
cmd = 'typescript-language-server --stdio',
}
return {
c = clangd,
cpp = clangd,
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'},
-- lua (lua-language-server) language server configuration
-- https://github.com/sumneko/lua-language-server
lua = {
name = 'lua-language-server',
cmd = 'lua-language-server',
settings = {
Lua = {diagnostics = {globals = {'vis'}}, telemetry = {enable = false}},
},
},
-- typescript (typescript-language-server) language server configuration
-- https://github.com/typescript-language-server/typescript-language-server
javascript = typescript,
typescript = typescript,
-- dart language server configuration
-- https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md
dart = {
name = 'dart',
cmd = 'dart language-server --client-id vis-lspc --client-version ' .. lspc.version,
},
-- haskell (haskell-language-server)
-- https://github.com/haskell/haskell-language-server
haskell = {name = 'haskell', cmd = 'haskell-language-server-wrapper --lsp'},
-- ocaml (ocaml-language-server)
-- https://github.com/ocaml/ocaml-lsp
caml = {name = 'ocaml', cmd = 'ocamllsp'},
-- go (gopls)
-- https://github.com/golang/tools/tree/master/gopls
go = {name = 'go', cmd = 'gopls'},
-- bash (bash-language-server)
-- https://github.com/bash-lsp/bash-language-server
bash = {name = 'bash-language-server', cmd = 'bash-language-server start'},
-- html (html-language-server)
-- https://github.com/hrsh7th/vscode-langservers-extracted
html = {
name = 'html-language-server',
cmd = 'vscode-html-language-server --stdio',
},
-- css (css-language-server)
-- https://github.com/hrsh7th/vscode-langservers-extracted
css = {
name = 'css-language-server',
cmd = 'vscode-css-language-server --stdio',
},
-- json (json-language-server)
-- https://github.com/hrsh7th/vscode-langservers-extracted
json = {
name = 'json-language-server',
cmd = 'vscode-json-language-server --stdio',
},
}