mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(css): do not fold top-level blocks (#7562)
Using (block) makes the fold behavior only work on the line that the block starts not the start line of the statement, which is unideal when the preceding statement spans multiple lines. instead, use all top-level statements explicitly from https://github.com/tree-sitter/tree-sitter-css/blob/master/grammar.js
This commit is contained in:
parent
e5588abcfa
commit
c32b59a8fd
1 changed files with 6 additions and 0 deletions
|
|
@ -1,4 +1,10 @@
|
|||
[
|
||||
; top-level block statements from https://github.com/tree-sitter/tree-sitter-css/blob/master/grammar.js
|
||||
; note: (block) is not used due to unideal behavior when node before block node spans multiple lines
|
||||
(rule_set)
|
||||
(at_rule)
|
||||
(supports_statement)
|
||||
(media_statement)
|
||||
(keyframe_block)
|
||||
(import_statement)+
|
||||
] @fold
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue