Editing HEEX with Emacs web-mode - how to recognize <.tag> as a tag?

A (doom) emacs user here.

web-mode ignores <.liveviewtags> which is especially annoying for closing the tags.
Has anyone here figured out how to configure web-mode to recognize live view tags as tags?
Tried to tweak the web-mode-(start-)tag-regexp variable, as well as messing with web-mode-engine-* variable but these did not help.

1 Like


not a solution, but have you considered Heex Tresitter Mode?

1 Like

Thank you for the pointer! I looked there, but I understand it requires emacs 29 and I am not sure Doom Emacs config is v29 ready yet…

Confirming that in with emacs29 heex-ts-mode does what I expect :slight_smile:
However, emacs29 is still under development and can break some packages

Perhaps you should file a bug report at the web-mode repo? That way once they fix it, you won’t have to upgrade to Emacs 29.

Actually I did this as first thing after failing to configure web-mode myself, but there is still no reply Elixir LiveView <.tag> syntax · Issue #1269 · fxbois/web-mode · GitHub

If you want to resolve this within web-mode itself (which is what I would do since this is something web-mode needs to sort out) the only thing we can do is to either fix this ourselves or wait for the maintainer.

I haven’t contributed to web-mode myself, but there is a chance that this is as simple as editing the regex for constitutes as a valid tag. Elisp is not my forte (it’s not many people’s forte), but if you do work on the PR, and you need some help, you can always ping me.


but hopefully Emacs 29 pretests will come out soon :slight_smile:

Marcin via Elixir Programming Language Forum noreply@elixirforum.com writes: