♻️ refactor(nvim): extended deno config detection for disabling tsserver

This commit is contained in:
Sergio Laín 2024-01-29 10:14:32 +01:00
parent 3939944393
commit 1a8f3b3f83
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -22,10 +22,13 @@ 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
return true if vim.fn.filereadable(root .. "/" .. config) == 1 then
return true
end
end end
return false return false
@ -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)