zed/extensions
Vitaly Slobodin 660cf214c7
ruby: Capture the heredoc content only and downcase the language (#12532)
# Summary

Hi. Current `heredoc` injection for Ruby language captures the
`heredoc_end` token. That's a bit incorrect because we want to capture
the content only. Suppose we have the following Ruby code:

```ruby
<<~JS
  function myFunc() {
    const myConstant = [];
  }

  let a = '1'
JS
```

And this is its syntax tree:

```
[program] [0, 0] - [7, 0]
  [heredoc_beginning] [0, 0] - [0, 5]
  [heredoc_body] [0, 5] - [6, 2]
    [heredoc_content] [0, 5] - [6, 0]
    [heredoc_end] [6, 0] - [6, 2]
```

Current injection capture all content of the `heredoc_body`:

![CleanShot 2024-05-31 at 17 03
31@2x](https://github.com/zed-industries/zed/assets/1894248/ff8c5195-b532-42d2-91b1-48405a6d3b50)

But we want to capture the `heredoc_content` only and this PR resolves
that, additionally it downcases the language like Zed does in other
languages like Terraform.

![CleanShot 2024-05-31 at 17 05
17@2x](https://github.com/zed-industries/zed/assets/1894248/e81dabd0-3246-4ef2-9524-a7adcb9242ab)


Release Notes:

- N/A
2024-05-31 11:19:10 -04:00
..
astro astro: Bump to v0.0.2 (#11834) 2024-05-14 19:12:43 -04:00
clojure Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
csharp csharp: Bump to v0.0.2 (#10651) 2024-04-16 15:49:16 -04:00
dart dart: Bump to v0.0.2 (#10940) 2024-04-24 13:03:56 -04:00
deno Extract Deno extension (#10912) 2024-04-23 20:44:11 -04:00
elixir elixir: Fix mix test $ZED_SYMBOL task (#11879) 2024-05-31 12:54:14 +02:00
elm Extract Elm language into an extension (#10432) 2024-04-11 10:23:49 -07:00
emmet emmet: release 0.0.3 (#11873) 2024-05-15 21:27:37 +02:00
erlang Extract Erlang support into an extension (#9974) 2024-03-29 18:03:38 -04:00
gleam Rework context insertion UX (#12360) 2024-05-27 17:44:54 -06:00
glsl glsl: Bump to v0.1.0 (#10734) 2024-04-18 11:57:21 -04:00
haskell haskell: Bump to v0.1.0 (#10378) 2024-04-10 15:42:46 -04:00
html html: Bump to 0.1.1 (#12093) 2024-05-21 18:36:47 +02:00
lua Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
ocaml Add xtask for finding crates with missing licenses (#11776) 2024-05-13 18:52:12 -04:00
php php: Update Pest tree-sitter queries to capture single quotes (#12467) 2024-05-30 16:37:41 +02:00
prisma prisma: Bump to v0.0.2 (#10689) 2024-04-17 12:40:01 -04:00
purescript Fix typo in PureScript extension's struct name (#9831) 2024-03-26 16:29:55 -04:00
racket Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
ruby ruby: Capture the heredoc content only and downcase the language (#12532) 2024-05-31 11:19:10 -04:00
scheme Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
svelte Use v0.0.6 of the zed_extension_api for extensions that need it (#10324) 2024-04-09 10:57:26 -04:00
terraform terraform: Sync Cargo.toml version with extension.toml version (#10937) 2024-04-24 11:42:18 -04:00
toml toml: Bump to v0.1.1 (#11359) 2024-05-03 11:29:53 -04:00
uiua Update extension descriptions (#9939) 2024-03-28 17:14:55 -04:00
vue vue: Bump to v0.0.2 (#11747) 2024-05-13 08:49:40 -04:00
zig zig: Pin ZLS to v0.11.0 (#12173) 2024-05-22 20:47:49 -04:00
.gitignore Provide wasm extensions with APIs needed for using pre-installed LSP binaries (#9085) 2024-03-08 17:18:06 -05:00