hedefalk / atom-vue

Vue component file syntax for Atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use babel syntax if exist

alxtz opened this issue · comments

In the package currently, we use the source.js syntax scope to parse the JavaScript parts of vue components ( either inline or in <script/> )

But the default source.js isn't extremely useful, since the default language-javascript package doesn't work out of the box.

image
( the $method is not getting highlighted, since language-javascript doesn't parse standalone variables )

if we add the new pattern source.js.jsx scope in the patterns, users that have installed language-babel could make use of the better javascript parsing.

image

so we could keep javascript parsing up to date if you've installed language-babel

image

if language-babel is not installed, it would just fall to the default language-javascript parsing

image

I think this should be a cool feature to add, I can make a PR, too.

@alxtz Sorry for no response and thanks for the report with detailed screenshots. This feature will be released in next version.