| Commit message (Collapse) | Author | Age |
|
|
|
| |
Also update the type annotation of TSNode:id(), which returns a string,
not an integer.
|
| |
|
|
|
|
|
|
| |
Co-authored-by: Wansmer <wansmer@gmail.com>
Co-authored-by: Andrew Voynov <andrewvoynov.b@gmail.com>
Co-authored-by: David Moberg <david.moberg@mediatek.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
With incremental injection parsing, injected languages' parsers parse
only the relevant regions and stores the result in _trees with the index
of the corresponding region. Therefore, there can be holes in _trees.
Solution:
* Use generic table functions where appropriate.
* Fix type annotations and docs.
|
|
|
|
|
|
|
|
| |
According to `:h TSNode` docs, there's also `TSNode:sexpr()` and
`TSNode:has_error()` that is part of `TSNode` class, but this wasn't
documented in `treesitter/_meta.lua`.
Adding missing fields in so the types is similar to `:h TSNode`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
- Add bindings to Treesitter ts_parser_set_logger and ts_parser_logger
- Add logfile with path STDPATH('log')/treesitter.c
- Rework existing LanguageTree loggin to use logfile
- Begin implementing log levels for vim.g.__ts_debug
|
| |
|
|
|
|
|
|
| |
- Begin using `@package` in place of `@private` for functions
that are accessed internally but outside their defined class.
- Rename Node -> TSP.Node
|
| |
|
|
|
|
|
|
|
| |
(#22575)
Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)"
This reverts commit 276b647fdba07bf1762d8dd371c4b655b8a418df.
|
| |
|
| |
|
| |
|
|
|