VS Code extension providing syntax highlighting for EVC (Embedded View Components) files.
- Syntax highlighting for ERB tags (
<% %>
,<%= %>
,<%# %>
) - JSX-like attribute syntax support (
prop={value}
) - Nested bracket matching for arrays and hashes
- HTML tag completion via Emmet
- Auto-closing pairs for brackets and ERB tags
- Proper folding for ERB blocks
- Download the latest
evc-language-x.x.x.vsix
from releases - Open VS Code
- Press
Cmd+Shift+P
(macOS) orCtrl+Shift+P
(Windows/Linux) - Type "Extensions: Install from VSIX..."
- Select the downloaded
.vsix
file - Reload VS Code when prompted
git clone https://github.com/[username]/evc-language-support.git
cd evc-language-support
npm install -g vsce
vsce package
code --install-extension evc-language-*.vsix
Open any .evc
file and you'll see "EVC" in the language selector (bottom right of VS Code). The extension provides proper syntax highlighting for the hybrid ERB/JSX syntax used in EVC files.
<Table as="table"
turbo_frame_name="users"
column_widths={[30, 20, 20, 30]}
pagy={pagy}>
<% table.with_headers([
{ text: "Name", sort_by: "name", default: true },
{ text: "Status" }
]) %>
<% users.each do |user| %>
<% table.with_row do |row| %>
<% row.with_columns([
{ text: user.name, path: user_path(user) },
{ text: user.status }
]) %>
<% end %>
<% end %>
</Table>
- ERB tags:
<% %>
,<%= %>
,<%# %>
- JSX attributes:
prop={value}
,data={array}
- Nested structures:
{[1, 2, {key: value}]}
- Ruby expressions: Method calls, symbols, operators
- HTML attributes:
class="value"
,id="element"
- Fork the repository
- Create a feature branch
- Make your changes
- Test the extension
- Submit a pull request
git clone https://github.com/[username]/evc-language-support.git
cd evc-language-support
# Make changes to syntaxes/evc.tmLanguage.json
vsce package
# Test the generated .vsix file
MIT License - see LICENSE file for details.