feat(tsgo): vtls -> tsgo for better lsp

This commit is contained in:
2026-08-01 17:12:48 +02:00
parent 4f3a605b77
commit 0df1c17c1f
2 changed files with 29 additions and 1 deletions
+15
View File
@@ -13,6 +13,21 @@ vim.lsp.config("vtsls", {
},
})
vim.lsp.config("tsgo", {
settings = {
typescript = {
inlayHints = {
parameterNames = { enabled = "all" },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
},
})
vim.lsp.config("denols", {
settings = {
deno = {
+14 -1
View File
@@ -5,7 +5,7 @@ local servers = {
"phpactor",
"ols",
"zls",
"vtsls",
"tsgo",
"eslint",
"yamlls",
"vimls",
@@ -38,6 +38,19 @@ for _, server in ipairs(servers) do
vim.lsp.enable(server)
end
vim.lsp.config("tsgo", {
cmd = function(dispatchers, config)
local bin = "tsc"
if (config or {}).root_dir then
local local_bin = vim.fs.joinpath(config.root_dir, "node_modules/.bin", bin)
if vim.fn.executable(local_bin) == 1 then
bin = local_bin
end
end
return vim.lsp.rpc.start({ bin, "--lsp", "--stdio" }, dispatchers)
end,
})
vim.lsp.config("digestif", {
cmd = { vim.fn.expand "~/.luarocks/bin/digestif" },
})