mirror of
https://git.aramjonghu.dev/AramJonghu/nvim.git
synced 2026-09-01 15:43:29 +02:00
feat(tsgo): vtls -> tsgo for better lsp
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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" },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user