Skip to content

Add ~HOLO sigil injection for the Hologram framework - #135

Open
deviprsd wants to merge 1 commit into
zed-extensions:mainfrom
deviprsd:add-holo-sigil-injection
Open

Add ~HOLO sigil injection for the Hologram framework#135
deviprsd wants to merge 1 commit into
zed-extensions:mainfrom
deviprsd:add-holo-sigil-injection

Conversation

@deviprsd

@deviprsd deviprsd commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Injects the holo grammar into ~HOLO sigil bodies (Elixir's inline-template syntax for the Hologram framework), mirroring the existing ~H/HEEx rule.
  • Marks the sigil body @embedded in highlights.scm so the generic sigil string highlight doesn't paint over the injected template content, same as HEEx.

Context

Hologram is an Elixir web framework with its own HTML-like template language, HOLO. Templates can live standalone in .holo files or inline in .ex files via ~HOLO sigils, analogous to Phoenix's ~H for HEEx.

A companion Zed extension providing the holo grammar/language already exists:

That extension can highlight standalone .holo files on its own, but sigil injection into .ex files is owned by this extension (same as HEEx), so it can't add the rule itself — hence this PR, following the same pattern already established for ~H.

Test plan

  • Confirmed the change is a straight structural mirror of the existing ~Hheex rules in both injections.scm and highlights.scm.
  • Manual verification in Zed with the holo grammar/extension installed: open a .ex file containing a ~HOLO"""...""" sigil and confirm the body highlights as HOLO rather than as a plain string.

Mirrors the existing ~H/HEEx sigil rules: injects the `holo` grammar
into ~HOLO sigil bodies and marks them @Embedded so the generic sigil
string highlight doesn't paint over the injected template content.
@cla-bot

cla-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @deviprsd on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@deviprsd

deviprsd commented Aug 8, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot

cla-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @deviprsd on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot

cla-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@deviprsd

deviprsd commented Aug 8, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Aug 8, 2026
@cla-bot

cla-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@AlternateRT AlternateRT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you very much for your contribution!


Out of curiosity, do you know if the maintainer of tree-sitter-holo would be interested in directly adding syntax highlighting for HOLO here?

I noticed that their zed-holo extension has not been added into Zed's extension registry, and personally speaking, I think it would be great if we shipped support for it with the official extension like we already do with HEEx.

@deviprsd

deviprsd commented Aug 8, 2026

Copy link
Copy Markdown
Author

@jamauro what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants