Add ~HOLO sigil injection for the Hologram framework - #135
Conversation
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.
|
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 check |
|
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'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
AlternateRT
left a comment
There was a problem hiding this comment.
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.
|
@jamauro what do you think? |
Summary
hologrammar into~HOLOsigil bodies (Elixir's inline-template syntax for the Hologram framework), mirroring the existing~H/HEEx rule.@embeddedin 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
.holofiles or inline in.exfiles via~HOLOsigils, analogous to Phoenix's~Hfor HEEx.A companion Zed extension providing the
hologrammar/language already exists:That extension can highlight standalone
.holofiles on its own, but sigil injection into.exfiles 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
~H→heexrules in bothinjections.scmandhighlights.scm.hologrammar/extension installed: open a.exfile containing a~HOLO"""..."""sigil and confirm the body highlights as HOLO rather than as a plain string.