♻️ refactor(nvim): extended deno config detection for disabling tsserver
This commit is contained in:
parent
3939944393
commit
1a8f3b3f83
1 changed files with 7 additions and 6 deletions
|
@ -22,11 +22,14 @@ local inlayHints = {
|
||||||
}
|
}
|
||||||
|
|
||||||
local function denoConfigExists()
|
local function denoConfigExists()
|
||||||
local root = require("lazyvim.util.root").get() .. "/deno.json"
|
local configs = { "deno.json", "deno.jsonc" }
|
||||||
|
local root = require("lazyvim.util.root").get()
|
||||||
|
|
||||||
if vim.fn.filereadable(root) == 1 then
|
for _, config in ipairs(configs) do
|
||||||
|
if vim.fn.filereadable(root .. "/" .. config) == 1 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -77,9 +80,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
denols = {
|
denols = {},
|
||||||
root_dir = require("lspconfig").util.root_pattern("deno.json", "deno.jsonc", "deno.lock"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
setup = {
|
setup = {
|
||||||
tsserver = function(_, opts)
|
tsserver = function(_, opts)
|
||||||
|
|
Loading…
Add table
Reference in a new issue