neovim/runtime/lua/vim/treesitter
Lewis Russell aca2048bcd refactor(treesitter): redesign query iterating
Problem:

  `TSNode:_rawquery()` is complicated, has known issues and the Lua and
  C code is awkwardly coupled (see logic with `active`).

Solution:

  - Add `TSQueryCursor` and `TSQueryMatch` bindings.
  - Replace `TSNode:_rawquery()` with `TSQueryCursor:next_capture()` and `TSQueryCursor:next_match()`
  - Do more stuff in Lua
  - API for `Query:iter_captures()` and `Query:iter_matches()` remains the same.
  - `treesitter.c` no longer contains any logic related to predicates.
  - Add `match_limit` option to `iter_matches()`. Default is still 256.
2024-03-19 14:24:59 +00:00
..
_fold.lua revert: "feat(treesitter): add foldtext with treesitter highlighting" 2024-01-27 08:38:56 +08:00
_meta.lua refactor(treesitter): redesign query iterating 2024-03-19 14:24:59 +00:00
_query_linter.lua refactor(treesitter): redesign query iterating 2024-03-19 14:24:59 +00:00
_range.lua feat(treesitter)!: incremental injection parsing 2023-08-12 16:11:36 +01:00
dev.lua docs: improve/add documentation of Lua types 2024-03-01 23:02:18 +00:00
health.lua refactor: create function for deferred loading 2024-02-03 16:53:41 +01:00
highlighter.lua fix(treesitter): revert to using iter_captures in highlighter 2024-03-17 20:37:15 +00:00
language.lua feat!: remove deprecated functions 2024-03-09 10:54:24 +01:00
languagetree.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
query.lua refactor(treesitter): redesign query iterating 2024-03-19 14:24:59 +00:00