summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/treesitter/_range.lua
AgeCommit message (Collapse)AuthorFiles
2026-03-14refactor(treesitter): move range related functionsaltermo1
2025-06-06fix: type fixesLewis Russell1
Type fixes caught by emmylua
2025-05-10refactor(docs): remove unnecessary `@private`/`@nodoc` annotations (#33951)Maria José Solano1
* refactor(docs): remove `@private` annotations from local functions * refactor(docs): remove unnecessary `@nodoc` annotations
2025-04-13fix(treesitter): injected lang ranges may cross capture boundaries #32549Riley Bruins1
Problem: treesitter injected language ranges sometimes cross over the capture boundaries when `@combined`. Solution: Clip child regions to not spill out of parent regions within languagetree.lua, and only apply highlights within those regions in highlighter.lua. Co-authored-by: Cormac Relf <web@cormacrelf.net>
2024-08-06docs(treesitter): generate inline docs for `Range`sYi Ming1
docs(treesitter): in-place parameter description docs(treesitter): remove internal type names docs(treesitter): add missing private annotation
2023-08-12feat(treesitter)!: incremental injection parsingLewis Russell1
Problem: Treesitter highlighting is slow for large files with lots of injections. Solution: Only parse injections we are going to render during a redraw cycle. --- - `LanguageTree:parse()` will no longer parse injections by default and now requires an explicit range argument to be passed. - `TSHighlighter` now parses injections incrementally during on_win callbacks for the line range being rendered. - Plugins which require certain injections to be parsed must run `parser:parse({ start_row, end_row })` before using the tree.
2023-05-16fix(treesitter): correctly calculate bytes for text sources (#23655)Lewis Russell1
Fixes #20419
2023-03-11refactor(treesitter): add Range type aliase for Range4|Range6Lewis Russell1
2023-03-10feat(treesitter)!: consolidate query util functionsLewis Russell1
- And address more type errors. - Removed the `concat` option from `get_node_text` since it was applied inconsistently and made typing awkward.
2023-03-09refactor(treesitter): use byte ranges from treesitter (#22589)Lewis Russell1
2023-03-08Revert "refactor(treesitter): delegate region calculation to treesitter" ↵Lewis Russell1
(#22575) Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)" This reverts commit 276b647fdba07bf1762d8dd371c4b655b8a418df.
2023-03-08refactor(treesitter): delegate region calculation to treesitter (#22553)Lewis Russell1
2023-03-06refactor(treesitter): simplify some range functionsLewis Russell1
2023-03-03fix(treesitter): typos in _range.luaJaehwang Jung1
fix(treesitter): typos _range.lua
2023-02-23perf(treesitter): smarter languagetree invalidationLewis Russell1
Problem: Treesitter injections are slow because all injected trees are invalidated on every change. Solution: Implement smarter invalidation to avoid reparsing injected regions. - In on_bytes, try and update self._regions as best we can. This PR just offsets any regions after the change. - Add valid flags for each region in self._regions. - Call on_bytes recursively for all children. - We still need to run the query every time for the top level tree. I don't know how to avoid this. However, if the new injection ranges don't change, then we re-use the old trees and avoid reparsing children. This should result in roughly a 2-3x reduction in tree parsing when the comment injections are enabled.