nvim-treesitter/queries/tiger/indents.scm

105 lines
1.4 KiB
Scheme
Raw Normal View History

2022-06-14 17:24:28 +02:00
; Control flow {{{
(if_expression) @indent.begin
2024-01-06 15:05:50 +09:00
"then" @indent.branch
2024-01-06 15:05:50 +09:00
"else" @indent.branch
2022-06-14 17:24:28 +02:00
(while_expression) @indent.begin
2024-01-06 15:05:50 +09:00
"do" @indent.branch
2022-06-14 17:24:28 +02:00
(for_expression) @indent.begin
2024-01-06 15:05:50 +09:00
"to" @indent.branch
2022-06-14 17:24:28 +02:00
2024-01-06 15:05:50 +09:00
; }}}
2022-06-14 17:24:28 +02:00
; Class {{{
(class_declaration) @indent.begin
2024-01-06 15:05:50 +09:00
(class_declaration
"}" @indent.end)
2022-06-14 17:24:28 +02:00
(class_type) @indent.begin
2022-06-14 17:24:28 +02:00
2024-01-06 15:05:50 +09:00
(class_type
"}" @indent.end)
; }}}
2022-06-14 17:24:28 +02:00
; Groups {{{
(let_expression) @indent.begin
2024-01-06 15:05:50 +09:00
"in" @indent.branch
2024-01-06 15:05:50 +09:00
"end" @indent.branch
2024-01-06 15:05:50 +09:00
(let_expression
"end" @indent.end)
(sequence_expression) @indent.begin
2024-01-06 15:05:50 +09:00
")" @indent.branch
2022-06-14 17:24:28 +02:00
2024-01-06 15:05:50 +09:00
(sequence_expression
")" @indent.end)
; }}}
2022-06-14 17:24:28 +02:00
; Functions and methods {{{
(parameters) @indent.begin
2024-01-06 15:05:50 +09:00
(parameters
")" @indent.end)
2022-06-14 17:24:28 +02:00
(function_call) @indent.begin
2024-01-06 15:05:50 +09:00
(function_call
")" @indent.end)
(method_call) @indent.begin
2024-01-06 15:05:50 +09:00
")" @indent.branch
2022-06-14 17:24:28 +02:00
(function_declaration) @indent.begin
2024-01-06 15:05:50 +09:00
(primitive_declaration) @indent.begin
2024-01-06 15:05:50 +09:00
(method_declaration) @indent.begin
2022-06-14 17:24:28 +02:00
2024-01-06 15:05:50 +09:00
; }}}
2022-06-14 17:24:28 +02:00
; Values and expressions {{{
(array_value) @indent.begin
2024-01-06 15:05:50 +09:00
"]" @indent.branch
2024-01-06 15:05:50 +09:00
(array_value
"]" @indent.end)
2022-06-14 17:24:28 +02:00
(array_expression) @indent.begin
2024-01-06 15:05:50 +09:00
"of" @indent.branch
2022-06-14 17:24:28 +02:00
(record_expression) @indent.begin
2024-01-06 15:05:50 +09:00
"}" @indent.branch
2024-01-06 15:05:50 +09:00
(record_expression
"}" @indent.end)
2022-06-14 17:24:28 +02:00
(record_type) @indent.begin
2024-01-06 15:05:50 +09:00
"}" @indent.branch
2024-01-06 15:05:50 +09:00
(record_type
"}" @indent.end)
2022-06-14 17:24:28 +02:00
(variable_declaration) @indent.begin
2022-06-14 17:24:28 +02:00
2024-01-06 15:05:50 +09:00
; }}}
2022-06-14 17:24:28 +02:00
; Misc{{{
(comment) @indent.ignore
2024-01-06 15:05:50 +09:00
(string_literal) @indent.ignore
2022-06-14 17:24:28 +02:00
2024-01-06 15:05:50 +09:00
; }}}
2022-06-14 17:24:28 +02:00
; vim: sw=2 foldmethod=marker