From ea1ae7f1e69dbf6fd5e34d75187b7db914fd3d37 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:19:38 +0100 Subject: [PATCH] lsp(deno): use root_dir --- lua/nxvim/lsp/plugins/mason/lspconfig.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lua/nxvim/lsp/plugins/mason/lspconfig.lua b/lua/nxvim/lsp/plugins/mason/lspconfig.lua index 00a5e42..b645a29 100644 --- a/lua/nxvim/lsp/plugins/mason/lspconfig.lua +++ b/lua/nxvim/lsp/plugins/mason/lspconfig.lua @@ -38,16 +38,7 @@ mason_lspconfig.setup_handlers({ server_opts.single_file_support = false server_opts.root_dir = lspconfig.util.root_pattern("package.json") elseif server == "denols" then - server_opts.single_file_support = true - -- server_opts.root_dir = lspconfig.util.root_pattern("deno.jsonc") -- Pointless with sfs enabled. - server_opts.on_attach = function(client, bufnr) - if vim.fn.filereadable(vim.fn.getcwd() .. "/package.json") == 1 then - -- Stop (since it starts due to single file support) in a npm project. - client.stop(bufnr) - return - end - on_attach(client, bufnr) - end + server_opts.root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc") elseif server == "jsonls" then server_opts.init_options = { provideFormatter = false } -- Use prettierd as formatter. elseif server == "zls" then