mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
fix(gleam): minor indent fixes
This commit is contained in:
parent
5ac8cf8ee5
commit
f84de0d6cd
3 changed files with 16 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
; Gleam indents similar to Rust and JavaScript
|
; Gleam indents similar to Rust and JavaScript
|
||||||
[
|
[
|
||||||
|
(anonymous_function)
|
||||||
(assert)
|
(assert)
|
||||||
(case)
|
(case)
|
||||||
(case_clause)
|
(case_clause)
|
||||||
|
|
@ -11,7 +12,6 @@
|
||||||
(let)
|
(let)
|
||||||
(list)
|
(list)
|
||||||
(constant)
|
(constant)
|
||||||
(external_function)
|
|
||||||
(function)
|
(function)
|
||||||
(type_definition)
|
(type_definition)
|
||||||
(type_alias)
|
(type_alias)
|
||||||
|
|
|
||||||
7
tests/indent/gleam/anonymous_function.gleam
Normal file
7
tests/indent/gleam/anonymous_function.gleam
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
fn() {
|
||||||
|
fn() {
|
||||||
|
fn() {
|
||||||
|
True
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -115,5 +115,13 @@ describe("indent Gleam:", function()
|
||||||
run:new_line("todo.gleam", { on_line = 3, text = "//", indent = 4 })
|
run:new_line("todo.gleam", { on_line = 3, text = "//", indent = 4 })
|
||||||
run:new_line("todo.gleam", { on_line = 4, text = "//", indent = 2 })
|
run:new_line("todo.gleam", { on_line = 4, text = "//", indent = 2 })
|
||||||
run:new_line("todo.gleam", { on_line = 5, text = "//", indent = 0 })
|
run:new_line("todo.gleam", { on_line = 5, text = "//", indent = 0 })
|
||||||
|
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 1, text = "//", indent = 2 })
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 2, text = "//", indent = 4 })
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 3, text = "//", indent = 6 })
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 4, text = "//", indent = 6 })
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 5, text = "//", indent = 4 })
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 6, text = "//", indent = 2 })
|
||||||
|
run:new_line("anonymous_function.gleam", { on_line = 7, text = "//", indent = 0 })
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue