diff options
| author | Michael Parque <michael.t.parque@outlook.com> | 2025-02-19 18:12:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-19 18:12:46 +0100 |
| commit | c32b59a8fde33ced5b30ea97750336a6fcff402f (patch) | |
| tree | ac4e27b807709477daaa86397eb0165ea5b56823 | |
| parent | feat(gomod): support `tool` directive (#7649) (diff) | |
| download | nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.tar nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.tar.gz nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.tar.bz2 nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.tar.lz nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.tar.xz nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.tar.zst nvim-treesitter-c32b59a8fde33ced5b30ea97750336a6fcff402f.zip | |
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
| -rw-r--r-- | queries/css/folds.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/queries/css/folds.scm b/queries/css/folds.scm index dc3c14df9..60d69a917 100644 --- a/queries/css/folds.scm +++ b/queries/css/folds.scm @@ -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 |
