nvim-treesitter/queries/markdown/folds.scm
Lewis Russell 2eaf188269 fix(fold): don't include whitespace end regions
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.
2022-09-12 11:49:51 +01:00

9 lines
110 B
Scheme

(
[
(fenced_code_block)
(indented_code_block)
(list)
(section)
] @fold
(#trim! @fold)
)