Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlight for ERB in heredoc #2863

Open
1 task done
vtno opened this issue Nov 17, 2024 · 3 comments
Open
1 task done

Syntax highlight for ERB in heredoc #2863

vtno opened this issue Nov 17, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request good-first-issue Good for newcomers help-wanted Extra attention is needed

Comments

@vtno
Copy link

vtno commented Nov 17, 2024

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

I'm writing a lot of my ViewComponent with inline erb as heredoc and it would be great if the syntax highlight works for it as well.

Description

Based on the current grammar, using ERB in heredoc won't get syntax highlighted like the other supported language in this file.

I tried with HTML and it worked only with the non Ruby part.

It's quite odd that there are support for JS, GRAPHQL, and other languages but not ERB.

Implementation

We only need to add a configuration for ERB to the grammar file.

@vtno vtno added the enhancement New feature or request label Nov 17, 2024
@vinistock vinistock added good-first-issue Good for newcomers help-wanted Extra attention is needed labels Nov 18, 2024
@vinistock
Copy link
Member

Thank you for the feature suggestion! We should definitely handle ERB heredocs too.

@vtno
Copy link
Author

vtno commented Nov 18, 2024

@vinistock I can try to make a PR for this.

@vinistock
Copy link
Member

Awesome! If you hit any blockers, don't hesitate to ping the team in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants