vuejs / vue-syntax-highlight

💡 Sublime Text syntax highlighting for single-file Vue components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue Component script tag not highlighting properly

dshcheung opened this issue · comments

Screen Shot 2019-10-18 at 3 47 09 PM

on the left is Vue Component Syntax (*.vue)
on the right is Javascript (Babel) Syntax (*.jsx)

for some reason when its <script></script> in *.vue , the syntax doesn't display the same as in *.jsx files

is there a setting i am missing something?

I think the .vue extension is meant to be used with Single File Components, not pure jsx. It even says so in the readme for this project:

Sublime Text Syntax highlighting for single-file Vue.js components (enabled by vue-loader or vueify).

Furthermore, I'm not sure what you expect it to highlight differently from the babel syntax when used like this, as Vue script syntax is just regular js with a couple of known lifecycles in the root exported object.