aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorDavid <david@hmnd.io>2025-11-27 09:58:49 -0800
committerGitHub <noreply@github.com>2025-11-27 09:58:49 -0800
commit53140ef0314e03cf090e958abcecea82e6c61eb9 (patch)
tree924b90acc11a3f8b8684467b4e83ab8c9d3628b0 /lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.tar
nvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.tar.gz
nvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.tar.bz2
nvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.tar.lz
nvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.tar.xz
nvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.tar.zst
nvim-lspconfig-53140ef0314e03cf090e958abcecea82e6c61eb9.zip
fix(util): root_markers_with_field should not match directories #4219
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/util.lua2
1 files changed, 1 insertions, 1 deletions
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`.