From 8652c9570377678a78ecb19dbd33695e0e4ec4fc Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:06:18 +0200 Subject: [PATCH] fix(vtsls): remove redundant deno logic, upstreamed in `nvim-lspconfig` (#7011) ## Description Since https://github.com/neovim/nvim-lspconfig/pull/4304 `nvim-lspconfig` has inherent deno logic to disambiguate between deno/non-deno projects. I believe it'd be better to remove the logic from LazyVim, since it might lead to issues because of different behavior compared to `nvim-lspconfig` defaults (whose logic doesn't only rely on the existence of `deno/json`, but also looks for lock files and takes into account which is the largest path with regards to the found pattern files). It'd be better for users to change `root_dir` themselves if they don't agree with the inherent logic. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/lang/typescript.lua | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 8acbc46a..bc91e830 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -136,28 +136,6 @@ return { return true end, 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) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) ---@type string, string, lsp.Range