From 58a5a1eb8f92400c4dba1df9678735fbd0afb57b Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Tue, 20 Feb 2024 23:37:15 -0500 Subject: [PATCH] Automatically indent the cursor when adding a newline after a `{` in Gleam code files (#8097) Fixes: https://github.com/zed-industries/zed/issues/7295 Release Notes: - Fixed a bug where adding a newline after a `{` would not automatically indent the cursor in Gleam code files ([#7295](https://github.com/zed-industries/zed/issues/7295)). --- assets/settings/default.json | 3 +++ crates/zed/src/languages/gleam/indents.scm | 1 + 2 files changed, 4 insertions(+) create mode 100644 crates/zed/src/languages/gleam/indents.scm diff --git a/assets/settings/default.json b/assets/settings/default.json index 2212d18da2..1df60279db 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -494,6 +494,9 @@ "Elixir": { "tab_size": 2 }, + "Gleam": { + "tab_size": 2 + }, "Go": { "tab_size": 4, "hard_tabs": true, diff --git a/crates/zed/src/languages/gleam/indents.scm b/crates/zed/src/languages/gleam/indents.scm new file mode 100644 index 0000000000..e975469092 --- /dev/null +++ b/crates/zed/src/languages/gleam/indents.scm @@ -0,0 +1 @@ +(_ "{" "}" @end) @indent