Skip to content

kudoas/erb-inline-js-helper

Repository files navigation

ERB Inline JS Helper

ERB Inline JS Helper

Syntax highlighting and language features for JavaScript embedded in Rails ERB javascript_tag blocks.

image

Features

  • Enhances javascript_tag with JavaScript highlighting, code completion, hover info, and go to definition
  • Uses JavaScript comment toggling (//) inside javascript_tag blocks
  • Works as an injection into text.html.erb grammar for ERB files.

Installation

Requirements

  • An extension that provides the ERB language grammar (text.html.erb) is required.
  • In this environment, Shopify.ruby-lsp provides the ERB grammar.

Usage

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.

Configuration

No settings are required.

About

VS Code extension to provide syntax highlighting and code completion for JavaScript embedded in Rails ERB javascript_tag blocks and inline strings.

Resources

License

Stars

Watchers

Forks

Contributors

Languages