Bad Javascript Syntax Highlighting in Html/Vue files

I’ve noticed that the syntax highlighting inside <script> tag in html files isn’t the same as the one in javascript file, why?


P.S. I’m currently using one dark default atom theme.

In Settings, scroll down and uncheck Use Tree Sitter Parsers, then see if they’re still different.

1 Like

Now the syntax highlighting of the javascript files is the same as that of the Html ones.
Despite this, I prefer the Tree-sitter syntax highlighting, is there a way to activate it in all files?

It seems you have disabled Tree-sitter for HTML specifically. Do you recall a time you may have done this?

Either way, check the file ~/.atom/config.cson for an HTML scoped Tree-sitter disable.

Since config.cson seemed ok, I tried to delete and reinstall atom (removing even the hidden files).
The syntax highlighting seemed to be normal again, but after reinstalling the language-vue package, in the script tags of the HTML (and vue) files, there is no longer the tree-sitter syntax highlighting.
Here is my current config.cson:

It’s because language-vue doesn’t have a Tree-sitter grammar.

How can I prioritize default tree-sitter javascript syntax highlighting inside <script> tags?

I don’t know.

Nor do I know the answer … but being curious I read this.