Skip to content

Commit 907c732

Browse files
committed
Extension lsp lua
1 parent 3338d39 commit 907c732

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
return {
3+
-- DEPRECATED, now assimilated inside modules.lsp.lua
4+
{
5+
enabled = false,
6+
'fsgreco/custom-lsp-extension', -- this is a "fake" plugin, only this lua table to extend neovim/nvim-lspconfig
7+
dir = vim.fn.stdpath("config") .. "/lua/custom/plugins/", -- Point to local directory
8+
dependencies = {
9+
'neovim/nvim-lspconfig',
10+
},
11+
config = function()
12+
local servers = {
13+
pyright = {},
14+
ts_ls = {
15+
root_dir = require("lspconfig").util.root_pattern({ "package.json", "tsconfig.json", "jsconfig.json" }),
16+
single_file_support = false,
17+
-- settings = {},
18+
root_markers = { "package.json" },
19+
workspace_required = true,
20+
},
21+
denols = {
22+
root_dir = require('lspconfig').util.root_pattern({ "deno.json", "deno.jsonc" }),
23+
single_file_support = false,
24+
-- settings = {}
25+
root_markers = { "deno.json", "deno.jsonc" },
26+
workspace_required = true,
27+
},
28+
html = {},
29+
cssls = {},
30+
eslint = {},
31+
gopls = {},
32+
astro = {},
33+
}
34+
35+
require('mason-tool-installer').setup { ensure_installed = vim.tbl_keys(servers or {}) }
36+
37+
for server_name, server_config in pairs(servers) do
38+
require('lspconfig')[server_name].setup(server_config)
39+
end
40+
end
41+
}
42+
}

0 commit comments

Comments
 (0)