aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lspconfig.txt
diff options
context:
space:
mode:
authorEmilio Ziniades <emilioziniades@protonmail.com>2023-11-18 09:40:13 +0200
committerGitHub <noreply@github.com>2023-11-18 15:40:13 +0800
commit7384e7149e79365c96dc623d9fa3444737776982 (patch)
treef1cf3d3370bac853772bbbbfcd42090cd219a59b /doc/lspconfig.txt
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.tar
nvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.tar.gz
nvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.tar.bz2
nvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.tar.lz
nvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.tar.xz
nvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.tar.zst
nvim-lspconfig-7384e7149e79365c96dc623d9fa3444737776982.zip
fix: util.root_pattern prioritises pattern order (#2885)
* fix: util.root_pattern prioritises pattern order Instead of traversing the filesystem upwards once and returning the first match of all the patterns, it traverses the filesystem upwards once for each pattern. This means that the order of the patterns provided matters, and the highest priority patterns should be put first. Also updated corresponding tests. * docs: update util.root_pattern description
Diffstat (limited to 'doc/lspconfig.txt')
-rw-r--r--doc/lspconfig.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt
index 5a1da207..4a5cce19 100644
--- a/doc/lspconfig.txt
+++ b/doc/lspconfig.txt
@@ -371,7 +371,8 @@ below returns a function that takes as its argument the current buffer path.
- `util.root_pattern`: function which takes multiple arguments, each
corresponding to a different root pattern against which the contents of the
current directory are matched using |vim.fn.glob()| while traversing up the
- filesystem.
+ filesystem. Parent directories are traversed once per pattern, in the order
+ the patterns are specified.
>
root_dir = util.root_pattern('pyproject.toml', 'requirements.txt')
<