Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ruby: Document how to use `erb-formatter` for ERB files (#33872)

Vitaly Slobodin0555bbd0ec1d
diff --git a/docs/src/languages/ruby.md b/docs/src/languages/ruby.md
index f8df187e8a2..b7856b2cd07 100644
--- a/docs/src/languages/ruby.md
+++ b/docs/src/languages/ruby.md
@@ -379,3 +379,22 @@ The Ruby extension provides a debug adapter for debugging Ruby code. Zed's name
}
]
```
+
+## Formatters
+
+### `erb-formatter`
+
+To format ERB templates, you can use the `erb-formatter` formatter. This formatter uses the [`erb-formatter`](https://rubygems.org/gems/erb-formatter) gem to format ERB templates.
+
+```jsonc
+{
+ "HTML/ERB": {
+ "formatter": {
+ "external": {
+ "command": "erb-formatter",
+ "arguments": ["--stdin-filename", "{buffer_path}"],
+ },
+ },
+ },
+}
+```