Fix indent queries

You need to add '@indent' to the *parent* node, which whill indent the
children. For some reason I understood it as marking the node that
should be indented when I wrote these.

These were tested manually in Neovim, I need to add a way to test them
correctly though.
This commit is contained in:
Bruno BELANYI 2022-06-12 20:38:48 +02:00
parent 2b2a75af43
commit bca103a393

View file

@ -1,20 +1,18 @@
; Control flow {{{ ; Control flow {{{
(if_expression (if_expression) @indent
consequence: (_) @indent) "then" @branch
"else" @branch "else" @branch
(while_expression (while_expression) @indent
body: (_) @indent) "do" @branch
(for_expression (for_expression) @indent
body: (_) @indent) "to" @branch
; }}} ; }}}
; Class {{{ ; Class {{{
(class_declaration (class_declaration) @indent
fields: (_)* @indent) (class_type) @indent
(class_type
fields: (_)* @indent)
; }}} ; }}}
; Misc{{{ ; Misc{{{