zed icon indicating copy to clipboard operation
zed copied to clipboard

Add Ruby language injections

Open BuonOmo opened this issue 2 years ago • 3 comments

This adds support for Ruby heredoc's syntax highlighting. The injection was directly taken from the tree-sitter documentation.

It is quite simple, but has the drawback of only showing highlighting once the heredoc is fully written and next line is started. This is due to the fact that we use the last line of the heredoc to determine the language. As using the first one would require some cleaning up that we cannot do trivially. (I might have not fully understood the behaviour of the #match? predicate, which could help us)

Fixes #4473

Release Notes:

  • Added Ruby language injections (#4473).
image

BuonOmo avatar Mar 04 '24 03:03 BuonOmo

We require contributors to sign our Contributor License Agreement, and we don't have @BuonOmo on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot[bot] avatar Mar 04 '24 03:03 cla-bot[bot]

@cla-bot check

BuonOmo avatar Mar 04 '24 03:03 BuonOmo

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Mar 04 '24 03:03 cla-bot[bot]

Thanks @BuonOmo !

maxbrunsfeld avatar May 10 '24 16:05 maxbrunsfeld