web-mode icon indicating copy to clipboard operation
web-mode copied to clipboard

Improvements for Elixir .heex

Open aparkerdavid opened this issue 4 years ago • 6 comments

In a heex template, web-mode should be able to recognize tags with leading periods, e.g. <.some_component> , </.some_component>, <.some_component />.

Inside of tags, curly braces should be handled as EEX code delimiters. e.g. <div class={some_function(@something)}>

aparkerdavid avatar Oct 18 '21 16:10 aparkerdavid

I would also like this feature, it makes working with heex filex very difficult without it, especially in cases where components are heavily used such as here:

image

Syntax highlighting doesn't work, nor does formatting.

I don't know elisp (I know other lisps though), but I would be happy to take a look at implementing what's required to make this work if you can point me in the right direction.

Cgboal avatar Dec 31 '21 00:12 Cgboal

I also want this.

For the time being, is there anyway to make it consider . and : legit characters for tag names?

vfsoraki avatar Jan 25 '22 11:01 vfsoraki

I'd also appreciate this feature :+1: Also, thank you web-mode maintainers for work thus far!

knoebber avatar Mar 12 '22 21:03 knoebber

@Cgboal could you provide your example on gist please

fxbois avatar May 24 '22 20:05 fxbois

@fxbois https://gist.github.com/knoebber/0834d29b8a5f0710de239041e6a7627b

knoebber avatar Jun 12 '22 18:06 knoebber

While this is being worked on, here is an option to create a derived mode for .heex files that uses tree-sitter.

jsmestad avatar Sep 19 '22 17:09 jsmestad