elixir-ts-mode icon indicating copy to clipboard operation
elixir-ts-mode copied to clipboard

Highlight not working properly for embedded heex

Open davidahmed opened this issue 3 years ago • 4 comments

I am on GNU Emacs 30.0.5 (Mac OS Ventura). I have the most minimal setup (basic theming).

I add only the following to my init.el

(use-package elixir-ts-mode
    :ensure t)

With just the above two lines, the Elixir code is highlighted as expected, however, the embedded heex is not highlighted properly.

Screenshot 2023-04-14 at 22 06 27

What am I missing here?

davidahmed avatar Apr 14 '23 20:04 davidahmed

@davidahmed What do you mean by "properly"?

Note for emacs 30 elixir-ts-mode and heex-ts-mode's are part of emacs core. you can just add:

(require 'heex-ts-mode)
(require 'elixir-ts-mode)

and it should work.

wkirschbaum avatar Apr 15 '23 08:04 wkirschbaum

Sorry, I was not clear enough. This is what I mean by not working properly. Basically, the highlights are missing for Elixir that is embedded inside the heex. elixir-ts-mode

davidahmed avatar Apr 15 '23 14:04 davidahmed

@davidahmed is currently a limitation with the heex tree-sitter grammar. We can potentially override the heex fontification, but won't happen soon.

wkirschbaum avatar Apr 17 '23 07:04 wkirschbaum

Related https://github.com/elixir-lang/tree-sitter-elixir/issues/2

wkirschbaum avatar Oct 25 '23 05:10 wkirschbaum