aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Lacerda <igorlfs@ufmg.br>2026-03-28 09:10:33 -0300
committerGitHub <noreply@github.com>2026-03-28 08:10:33 -0400
commit16812abf0e8d8175155f26143a8504e8253e92b0 (patch)
tree7bdabbbc397c213afccc561dbd951c11ae39d185
parentfix(ci): avoid yucky "chore" type (diff)
downloadnvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.tar
nvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.tar.gz
nvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.tar.bz2
nvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.tar.lz
nvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.tar.xz
nvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.tar.zst
nvim-lspconfig-16812abf0e8d8175155f26143a8504e8253e92b0.zip
fix(biome): set lower priority for config files as root #4363
-rw-r--r--lsp/biome.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/lsp/biome.lua b/lsp/biome.lua
index 6ec5ceb0..f6d25d05 100644
--- a/lsp/biome.lua
+++ b/lsp/biome.lua
@@ -50,12 +50,12 @@ return {
'bun.lockb',
'bun.lock',
'deno.lock',
- 'biome.json',
- 'biome.jsonc',
}
+ -- Set a lower priority to avoid spawning multiple servers on monorepos
+ local biome_config_files = { 'biome.json', 'biome.jsonc' }
-- Give the root markers equal priority by wrapping them in a table
- root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
- or vim.list_extend(root_markers, { '.git' })
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, biome_config_files, { '.git' } }
+ or vim.list_extend(root_markers, vim.list_extend(biome_config_files, { '.git' }))
-- We fallback to the current working directory if no project root is found
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
@@ -63,7 +63,6 @@ return {
-- We know that the buffer is using Biome if it has a config file
-- in its directory tree.
local filename = vim.api.nvim_buf_get_name(bufnr)
- local biome_config_files = { 'biome.json', 'biome.jsonc' }
biome_config_files = util.insert_package_json(biome_config_files, 'biomejs', filename)
local is_buffer_using_biome = vim.fs.find(biome_config_files, {
path = filename,