TS.FoldInfo
Treesitter folding is done in two steps: (1) compute the fold levels with the syntax tree and cache the result (compute_folds_levels) (2) evaluate foldexpr for each window, which reads from the cache (foldupdate)
Fields6
FoldInfo.levels : string[]
the cached foldexpr result for each line
FoldInfo.levels0 : integer[]
the cached raw fold levels
The range edited since the last invocation of the callback scheduled in on_bytes. Should compute fold levels in this range.
FoldInfo.on_bytes_range : Range2 | nil
FoldInfo.foldupdate_range : Range2 | nil
The range on which to evaluate foldexpr. When in insert mode, the evaluation is deferred to InsertLeave.
FoldInfo.parser : vim.treesitter.LanguageTree | nil
The treesitter parser associated with this buffer.
FoldInfo.__index : TS.FoldInfo