From 7369f80b190ff0cb40406a61bbd4f0183abecabd Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Sun, 11 May 2025 10:52:14 -0700 Subject: [PATCH] refactor(treesitter): remove empty parse callback Now that we have bumped to tree-sitter 0.25.4, we no longer need to do this since upstream does it for us when calling the regular parse method. --- src/nvim/lua/treesitter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index a3d23c6f9d..29b2861cd4 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -545,8 +545,7 @@ static int parser_parse(lua_State *L) .progress_callback = on_parser_progress }; new_tree = ts_parser_parse_with_options(p, old_tree, input, parse_options); } else { - // Tree-sitter retains parse options after use, so we must explicitly reset them here. - new_tree = ts_parser_parse_with_options(p, old_tree, input, (TSParseOptions) { 0 }); + new_tree = ts_parser_parse(p, old_tree, input); } break;