Skip to content

guilbep/zed-eta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zed-eta

Eta template language support for the Zed editor.

Provides syntax highlighting and bracket matching for .eta files, with JavaScript injection inside <% %> template tags so the embedded code gets full JS highlighting (keywords, strings, function calls — the works) instead of looking like plain text.

Backed by the upstream tree-sitter-embedded-template grammar, which explicitly supports Eta alongside ERB and EJS.

Install

From the Zed extension registry (once published)

zed: extensions → search "Eta" → install.

From source (right now)

git clone https://github.com/guilbep/zed-eta

Then in Zed: zed: install dev extension → pick the cloned directory.

What you get

  • Syntax highlighting for Eta tags: <%, <%=, <%~, <%#, <%_, <%-, and their closing forms.
  • HTML highlighting in template content (the markup outside the tags).
  • JavaScript highlighting inside template tags — for-loops, ternaries, function calls, all of it.
  • Bracket matching for <% %>, plus standard (), [], {}, quotes.

What you don't get

  • A language server. There is no Eta LSP. Inside the embedded JS blocks, you'll get tree-sitter-based highlighting but not full JS LSP features (completion, go-to-definition, etc.) — those would require Zed to understand how to splice the JS context together across tags, which it currently doesn't.

Why a dedicated extension when EJS support already exists?

The grammar is identical (both use tree-sitter-embedded-template), and the existing EJS extension actually already lists .eta in its path_suffixes. So if all you need is highlighting, that works.

This extension exists because:

  1. Discoverability — Eta users shouldn't have to install something called "EJS" to get support.
  2. Status bar identity — your .eta files surface as "Eta", not "EJS".
  3. One-line README for downstream projects — "install the Eta extension" is a clearer ask than "edit your settings.json and add \"file_types\": { \"EJS\": [\"eta\"] }".

If you'd rather skip this extension entirely, the alias approach works too:

// ~/.config/zed/settings.json
{ "file_types": { "EJS": ["eta"] } }

Related

  • Eta — the templating engine itself.
  • vite-ssr-i18n-basic — Vite plugin for multi-locale static sites, uses Eta.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors