From 2f0fbdaa480c5b014b68bfdb85aa105d0bef3637 Mon Sep 17 00:00:00 2001 From: Siddhant Agarwal <68201519+siddhantdev@users.noreply.github.com> Date: Mon, 9 Jun 2025 22:01:37 +0530 Subject: feat(vim.fs): root() can specify "equal priority" #34276 --- runtime/lua/vim/lsp.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'runtime/lua/vim/lsp.lua') diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 450452157a..87109548b1 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -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 -- cgit