tree-sitter-tiger/queries/indents.scm

66 lines
1 KiB
Scheme
Raw Normal View History

2022-06-04 10:57:27 +02:00
; Control flow {{{
(if_expression) @indent
"then" @branch
2022-06-04 10:57:27 +02:00
"else" @branch
2022-06-04 10:58:14 +02:00
(while_expression) @indent
"do" @branch
2022-06-04 10:58:14 +02:00
(for_expression) @indent
"to" @branch
2022-06-04 10:57:27 +02:00
; }}}
2022-06-04 21:54:44 +02:00
; Class {{{
(class_declaration) @indent
(class_declaration "}" @indent_end)
(class_type) @indent
(class_type "}" @indent_end)
2022-06-04 21:54:44 +02:00
; }}}
2022-06-12 20:40:56 +02:00
; Groups {{{
(let_expression) @indent
"in" @branch
"end" @branch
(let_expression "end" @indent_end)
2022-06-12 20:40:56 +02:00
(sequence_expression) @indent
")" @branch
(sequence_expression ")" @indent_end)
2022-06-12 20:40:56 +02:00
; }}}
2022-06-12 20:41:40 +02:00
; Functions and methods {{{
(parameters) @indent
(parameters ")" @indent_end)
2022-06-12 20:41:40 +02:00
(function_call) @indent
(method_call) @indent
")" @branch
(function_declaration) @indent
(primitive_declaration) @indent
(method_declaration) @indent
; }}}
2022-06-12 20:44:21 +02:00
; Values and expressions {{{
(array_value) @indent
"]" @branch
(array_value "]" @indent_end)
2022-06-12 20:44:21 +02:00
(array_expression) @indent
"of" @branch
(record_expression) @indent
"}" @branch
(record_expression "}" @indent_end)
2022-06-12 20:44:46 +02:00
(variable_declaration) @indent
2022-06-12 20:44:21 +02:00
; }}}
; Misc{{{
(comment) @ignore
2022-06-04 11:00:41 +02:00
(string_literal) @ignore
; }}}
; vim: sw=2 foldmethod=marker