mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -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.
9 lines
110 B
Scheme
9 lines
110 B
Scheme
(
|
|
[
|
|
(fenced_code_block)
|
|
(indented_code_block)
|
|
(list)
|
|
(section)
|
|
] @fold
|
|
(#trim! @fold)
|
|
)
|