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
You folks likely want to report a bug/submit a PR here: GitHub - phoenixframework/tree-sitter-heex: HEEx grammer for Tree-sitter · GitHub
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.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance











