From 53140ef0314e03cf090e958abcecea82e6c61eb9 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 27 Nov 2025 09:58:49 -0800 Subject: fix(util): root_markers_with_field should not match directories #4219 --- lua/lspconfig/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index 9156fc46..931cbe3d 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -59,7 +59,7 @@ end --- @param fname string Full path of the current buffer name to start searching upwards from. function M.root_markers_with_field(root_files, new_names, field, fname) local path = vim.fn.fnamemodify(fname, ':h') - local found = vim.fs.find(new_names, { path = path, upward = true }) + local found = vim.fs.find(new_names, { path = path, upward = true, type = 'file' }) for _, f in ipairs(found or {}) do -- Match the given `field`. -- cgit v1.2.3-70-g09d2