summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/treesitter/_meta/tstree.lua
AgeCommit message (Collapse)AuthorFiles
2025-07-02fix(treesitter): ensure TSLuaTree is always immutableRodrigodd1
Problem: The previous fix in #34314 relies on copying the tree in `tree_root` to ensure the `TSNode`'s tree cannot be mutated. But that causes the problem where two calls to `tree_root` return nodes from different copies of a tree, which do not compare as equal. This has broken at least one plugin. Solution: Make all `TSTree`s on the Lua side always immutable, avoiding the need to copy the tree in `tree_root`, and make the only mutation point, `tree_edit`, copy the tree instead.
2024-10-03docs(treesitter): generate TSNode, TSTree docs #30643Riley Bruins1
**Problem:** The documentation for `TSNode` and `TSTree` methods is incomplete from the LSP perspective. This is because they are written directly to the vimdoc, rather than in Lua and generated to vimdoc. **Solution:** Migrate the docs to Lua and generate them into the vimdoc. This requires breaking up the `treesitter/_meta.lua` file into a directory with a few different modules. This commit also makes the vimdoc generator slightly more robust with regard to sections that have multiple help tags (e.g. `*one* *two*`)