From 1a8f3b3f83ee650c0d06062fa4607718145fee8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 29 Jan 2024 10:14:32 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20extended?= =?UTF-8?q?=20deno=20config=20detection=20for=20disabling=20tsserver?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/extras/lang/web/typescript-extended.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua b/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua index ca3a4669..6767e802 100644 --- a/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua @@ -22,10 +22,13 @@ local inlayHints = { } 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 - return true + for _, config in ipairs(configs) do + if vim.fn.filereadable(root .. "/" .. config) == 1 then + return true + end end return false @@ -77,9 +80,7 @@ return { }, }, }, - denols = { - root_dir = require("lspconfig").util.root_pattern("deno.json", "deno.jsonc", "deno.lock"), - }, + denols = {}, }, setup = { tsserver = function(_, opts)