feat(vim.fs): root() can specify "equal priority" #34276

This commit is contained in:
Siddhant Agarwal
2025-06-09 22:01:37 +05:30
committed by GitHub
parent 2d980e37c8
commit 2f0fbdaa48
5 changed files with 80 additions and 21 deletions

View File

@@ -726,13 +726,7 @@ function lsp.start(config, opts)
validate('root_markers', opts._root_markers, 'table')
config = vim.deepcopy(config)
for _, marker in ipairs(opts._root_markers) do
local root = vim.fs.root(bufnr, marker)
if root ~= nil then
config.root_dir = root
break
end
end
config.root_dir = vim.fs.root(bufnr, opts._root_markers)
end
if