mirror of
https://git.aramjonghu.dev/AramJonghu/nvim.git
synced 2026-09-05 09:13:31 +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", {
|
vim.lsp.config("denols", {
|
||||||
settings = {
|
settings = {
|
||||||
deno = {
|
deno = {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ local servers = {
|
|||||||
"phpactor",
|
"phpactor",
|
||||||
"ols",
|
"ols",
|
||||||
"zls",
|
"zls",
|
||||||
"vtsls",
|
"tsgo",
|
||||||
"eslint",
|
"eslint",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
"vimls",
|
"vimls",
|
||||||
@@ -38,6 +38,19 @@ for _, server in ipairs(servers) do
|
|||||||
vim.lsp.enable(server)
|
vim.lsp.enable(server)
|
||||||
end
|
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", {
|
vim.lsp.config("digestif", {
|
||||||
cmd = { vim.fn.expand "~/.luarocks/bin/digestif" },
|
cmd = { vim.fn.expand "~/.luarocks/bin/digestif" },
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user