Syntax highlighting and language features for JavaScript embedded in Rails ERB javascript_tag blocks.
- Enhances
javascript_tagwith JavaScript highlighting, code completion, hover info, and go to definition - Uses JavaScript comment toggling (
//) insidejavascript_tagblocks - Works as an injection into
text.html.erbgrammar for ERB files.
- Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=kudoas.erb-inline-js-helper
- Quick open in VS Code:
vscode:extension/kudoas.erb-inline-js-helper
- An extension that provides the ERB language grammar (
text.html.erb) is required. - In this environment,
Shopify.ruby-lspprovides the ERB grammar.
Open any .erb file that uses javascript_tag and the JavaScript section will be highlighted automatically, with
completion, hover, and definition support inside the block.
No settings are required.
