From 7001665342ade12823fba4f358a7e8efc2245a2b Mon Sep 17 00:00:00 2001 From: Stuart Hinson Date: Sun, 26 Dec 2021 23:07:09 -0500 Subject: [PATCH] Add ruby indents (#1372) * Add ruby indents * Include ruby in generated docs --- book/src/generated/lang-support.md | 2 +- runtime/queries/ruby/indents.toml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/ruby/indents.toml diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 9c42005b..28094484 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -34,7 +34,7 @@ | protobuf | ✓ | | ✓ | | | python | ✓ | ✓ | ✓ | `pylsp` | | racket | | | | `racket` | -| ruby | ✓ | | | `solargraph` | +| ruby | ✓ | | ✓ | `solargraph` | | rust | ✓ | ✓ | ✓ | `rust-analyzer` | | scala | ✓ | | ✓ | `metals` | | svelte | ✓ | | ✓ | `svelteserver` | diff --git a/runtime/queries/ruby/indents.toml b/runtime/queries/ruby/indents.toml new file mode 100644 index 00000000..b417751f --- /dev/null +++ b/runtime/queries/ruby/indents.toml @@ -0,0 +1,25 @@ +indent = [ + "argument_list", + "array", + "begin", + "block", + "call", + "class", + "case", + "do_block", + "elsif", + "if", + "hash", + "method", + "module", + "singleton_class", + "singleton_method", +] + +outdent = [ + ")", + "}", + "]", + "end", + "when", +]