nvim-treesitter/queries/gleam/indents.scm

29 lines
492 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)
2022-02-12 15:12:05 -08:00
(import)
2022-02-06 12:48:38 -08:00
(let)
(list)
(constant)
(function)
(type_definition)
(type_alias)
2022-02-12 15:12:05 -08:00
(todo)
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 "|>"))