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:
parent
2b2a75af43
commit
bca103a393
|
@ -1,20 +1,18 @@
|
|||
; Control flow {{{
|
||||
(if_expression
|
||||
consequence: (_) @indent)
|
||||
(if_expression) @indent
|
||||
"then" @branch
|
||||
"else" @branch
|
||||
|
||||
(while_expression
|
||||
body: (_) @indent)
|
||||
(while_expression) @indent
|
||||
"do" @branch
|
||||
|
||||
(for_expression
|
||||
body: (_) @indent)
|
||||
(for_expression) @indent
|
||||
"to" @branch
|
||||
; }}}
|
||||
|
||||
; Class {{{
|
||||
(class_declaration
|
||||
fields: (_)* @indent)
|
||||
(class_type
|
||||
fields: (_)* @indent)
|
||||
(class_declaration) @indent
|
||||
(class_type) @indent
|
||||
; }}}
|
||||
|
||||
; Misc{{{
|
||||
|
|
Loading…
Reference in New Issue