Skip to content

Commit

Permalink
fix(typescript): only search for package.json files in typescript l…
Browse files Browse the repository at this point in the history
…anguage servers
  • Loading branch information
mehalter committed May 24, 2024
1 parent 8aeb3e8 commit 6b8503f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lua/astrocommunity/pack/typescript/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ local lsp_rooter, prettierrc_rooter
local has_prettier = function(bufnr)
if type(bufnr) ~= "number" then bufnr = vim.api.nvim_get_current_buf() end
local rooter = require "astrocore.rooter"
if not lsp_rooter then lsp_rooter = rooter.resolve "lsp" end
if not lsp_rooter then
lsp_rooter = rooter.resolve("lsp", {
ignore = {
servers = function(client)
return not vim.tbl_contains({ "vtsls", "typescript-tools", "volar", "eslint", "tsserver" }, client.name)
end,
},
})
end
if not prettierrc_rooter then
prettierrc_rooter = rooter.resolve {
".prettierrc",
Expand Down

0 comments on commit 6b8503f

Please sign in to comment.