hhofner

hhofner

Unsupported inline `<script>` tag syntax highlighting in HEEx files

I didn’t really want to put this as a question, so apologies if you think it should indeed be there, but I was trying to write an inline script tag in a heex file and the syntax highlighting is not supported, at least for TreeSitter in Neovim, Zed, and Nova.

Now I’m not sure why, I would have imagined since they are correctly highlighted in VSCode and Sublime Text, but I guess the above editors are using the same syntax grammar. Anyone know where I could report this, or even better, where could I suggest a fix?

It’s very minor, but it’s bothering me more than it should and have also been wondering if there’s a better way to add inline JavaScript, maybe from the view module or controller?



Most Liked

josevalim

josevalim

Creator of Elixir

You folks likely want to report a bug/submit a PR here: GitHub - phoenixframework/tree-sitter-heex: HEEx grammer for Tree-sitter · GitHub

christhekeele

christhekeele

I’ve noticed this too, in VSCode HEEx syntax highlighting. That’s where I would direct a bug ticket (or, the analogous syntax highlighter extension for your environment).

While this is true for most uses of JS script tags in LiveView, I can imagine there are valid usecases, and don’t see why the syntax highlighter shouldn’t support coloring correctly, so IMO a bug.

Where Next?

Popular in Discussions Top

PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
fireproofsocks
This is more of a general question, but I’m wondering how other people in the community think about the pattern matching in function sign...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18146 126
New
rower687
Hi all, I’ve been reading a lot about the “let it crash” term and how supervising processes and the whole messaging passing make an elixi...
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they w...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement