nvim-treesitter/queries/gleam/indents.scm

31 lines
520 B
Scheme
Raw Normal View History

2022-02-06 12:48:38 -08:00
; Gleam indents similar to Rust and JavaScript
[
2022-02-12 15:12:05 -08:00
(assert)
2022-02-06 12:48:38 -08:00
(case)
(case_clause)
(constant)
(expression_group)
2022-02-12 15:12:05 -08:00
(external_function)
2022-02-06 12:48:38 -08:00
(function)
2022-02-12 15:12:05 -08:00
(import)
2022-02-06 12:48:38 -08:00
(let)
(list)
(constant)
(external_function)
(function)
(type_definition)
(type_alias)
2022-02-12 15:12:05 -08:00
(todo)
(try)
2022-02-06 12:48:38 -08:00
(tuple)
] @indent.begin
2022-02-06 12:48:38 -08:00
[
")"
"]"
"}"
] @indent.end @indent.branch
2022-02-12 15:12:05 -08:00
; Gleam pipelines are not indented, but other binary expression chains are
((binary_expression operator: _ @_operator) @indent.begin (#not-eq? @_operator "|>"))