From e502e8106a4cde676190cd6d5c0c018eb6fd1d65 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 22:58:02 +0200 Subject: [PATCH] fix(treesitter): bump match limit up (#18400) This avoids ignoring too many match results, and avoid highlighting being blank in some files. (cherry picked from commit e453b6391e1483286385b925f5799dfc4feebdd8) Co-authored-by: Thomas Vigouroux --- src/nvim/lua/treesitter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index f4067ad02f..c9c9b18051 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -1122,7 +1122,7 @@ static int node_rawquery(lua_State *L) // TODO(clason): API introduced after tree-sitter release 0.19.5 // remove guard when minimum ts version is bumped to 0.19.6+ #ifdef NVIM_TS_HAS_SET_MATCH_LIMIT - ts_query_cursor_set_match_limit(cursor, 32); + ts_query_cursor_set_match_limit(cursor, 64); #endif ts_query_cursor_exec(cursor, query, node);