diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-03-03 16:16:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 16:16:17 +0100 |
commit | 7e90f247e7b3add74a49895054a543c2140bbb08 (patch) | |
tree | 59c7e4c3c91567b84f9aba7103039d501d212360 /src | |
parent | bf90ceb5488ea2b41eb53335984f017785aefea9 (diff) | |
download | rneovim-7e90f247e7b3add74a49895054a543c2140bbb08.tar.gz rneovim-7e90f247e7b3add74a49895054a543c2140bbb08.tar.bz2 rneovim-7e90f247e7b3add74a49895054a543c2140bbb08.zip |
fix(treesitter): raise ts_match_limit to 256 (#22497)
Problem: Some complex queries may not return all matches.
Solution: Raise `ts_match_limit` from current 64 (twice the original
default) to 256 (which Helix uses, and seems to be enough for the reported
problematic cases).
If this leads performance regressions in other queries, we should add a
generic querying timeout instead of relying on a low value here.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/lua/treesitter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 2db12b8ded..4cbe7329a6 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -1319,7 +1319,7 @@ static int node_rawquery(lua_State *L) } else { cursor = ts_query_cursor_new(); } - ts_query_cursor_set_match_limit(cursor, 64); + ts_query_cursor_set_match_limit(cursor, 256); ts_query_cursor_exec(cursor, query, node); bool captures = lua_toboolean(L, 3); |