nvim-treesitter/runtime/queries/gleam/indents.scm

29 lines
483 B
Scheme
Raw Normal View History

2022-02-06 12:48:38 -08:00
; Gleam indents similar to Rust and JavaScript
[
2023-06-03 21:39:20 -04:00
(anonymous_function)
2022-02-12 15:12:05 -08:00
(assert)
2022-02-06 12:48:38 -08:00
(case)
(case_clause)
(constant)
2022-02-12 15:12:05 -08:00
(external_function)
2022-02-06 12:48:38 -08:00
(function)
(let)
(list)
(type_definition)
(type_alias)
2022-02-12 15:12:05 -08:00
(todo)
2022-02-06 12:48:38 -08:00
(tuple)
(unqualified_imports)
] @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
2024-01-06 15:05:50 +09:00
((binary_expression
operator: _ @_operator) @indent.begin
(#not-eq? @_operator "|>"))