mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
Some languages that are difficult to parse via Treesitter may incorrectly include whitespace lines at the end of regions. This can makes the calculated folds sub-optimal. To recitfy, use a custom directive (trim), to calculate the range with the trailing whitespace lines removed. Note this only works if the region end column is 0. Also added folds for Make.
7 lines
64 B
Scheme
7 lines
64 B
Scheme
(
|
|
[
|
|
(conditional)
|
|
(rule)
|
|
] @fold
|
|
(#trim! @fold)
|
|
)
|