Currently, the vue.js tag does not automatically apply any syntax highlighting.
I have reviewed these 2 posts:
Meta SE - What is syntax highlighting and how does it work?
Meta SO - What is syntax highlighting and how does it work?
To save time I am trying to answer some of the FAQ from these posts:
If your post doesn't have the correct highlighting, it's possible it's not supported. Please look at the list of supported languages.
It isn't exactly a new language since it is comprised of multiple languages that already work. Does that matter?
If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page. The language hint (if any) that is currently being used for that tag will be displayed at the very bottom, below the buttons for the wiki:
Currently vue.js has no inference set and I'm not sure what inference should be added.
There doesn't seem to be an issue on the code-prettify project GitHub yet. However, I don't know whether to open the issue there or not because I am unsure if we need a new language tag or if we should have a whole new language ruleset or if the language should be inferred from the tag.
Simply tagging vue.js might not infer enough because it is a combination of JS/CSS/HTML and I suppose HTML could be run through the JS parser or vice versa.
Additionally, there are varying ways to write Vue code, you can write standalone JS and HTML templates using the runtime version, or you can write single file Vue components that combine all three pieces. I don't know how you could infer this syntax. It would effectively have to look like the default runnable snippet template but without the <!-- language: lang-or-tag-here -->
mixed in which causes even more loss of context.
What I have been doing whenever I run across Vue questions that don't have any highlighting is just adding the language code manually. This works, but is cumbersome.
I suppose my question boils down to:
- How should Vue syntax highlighting with prettify be addressed?
- Where should effort (if any) be documented? Here on Meta? As an issue in the GitHub? Somewhere else?
- Are there other language frameworks that face something similar? How did they address it?
<!-- language-all: ... -->
tag at the top of the question based on the tags. As with the snippets and e.g. Angular, which also mixes HTML, CSS and JS/TS (although not always in one file), I don't see a better option for Vue than tagging the separate parts appropriately.