mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
backport: feat(vim.fs): vim.fs.root() can control priority #34413
feat(vim.fs): vim.fs.root() can control priority
Adds the capability of controlling the priority of searched markers in
vim.fs.root() by nesting lists.
(cherry picked from commit 0f0b96dd0f
)
This commit is contained in:
@@ -708,13 +708,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
|
||||
|
Reference in New Issue
Block a user