mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(vtsls): remove redundant deno logic, it's upstreamed in nvim-lspconfig
This commit is contained in:
parent
c64a61734f
commit
dd28b23949
1 changed files with 0 additions and 22 deletions
|
|
@ -132,28 +132,6 @@ return {
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
vtsls = function(_, opts)
|
vtsls = function(_, opts)
|
||||||
if vim.lsp.config.denols and vim.lsp.config.vtsls then
|
|
||||||
---@param server string
|
|
||||||
local resolve = function(server)
|
|
||||||
local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir
|
|
||||||
vim.lsp.config(server, {
|
|
||||||
root_dir = function(bufnr, on_dir)
|
|
||||||
local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil
|
|
||||||
if is_deno == (server == "denols") then
|
|
||||||
if root_dir then
|
|
||||||
return root_dir(bufnr, on_dir)
|
|
||||||
elseif type(markers) == "table" then
|
|
||||||
local root = vim.fs.root(bufnr, markers)
|
|
||||||
return root and on_dir(root)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
resolve("denols")
|
|
||||||
resolve("vtsls")
|
|
||||||
end
|
|
||||||
|
|
||||||
Snacks.util.lsp.on({ name = "vtsls" }, function(buffer, client)
|
Snacks.util.lsp.on({ name = "vtsls" }, function(buffer, client)
|
||||||
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
||||||
---@type string, string, lsp.Range
|
---@type string, string, lsp.Range
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue