Closed probil closed 8 years ago
@probil you can add type="text/babel"
to solve it
@agileago Thanks for the advice! Work as expected now.
So, maybe vue-for-idea
should add it automatically on File > New > Vue Component
?
@probil new version is supported
After plugin update I have created new Vue File
.
And I don't see type="text/babel
in script tag. So, ES6 syntax still not working. There is also error in code.
@probil ES6 the problem may be in the next period of time to be able to deal with. Because at the moment I am not very well aware of the idea plug-in development and syntax analysis. In the learning...
@probil - Default it's ES5, if you want to use ES6 you'd have to put type="text/babel
there yourself.
@henjue - would be nice if people could choose which type
of script/css/template they want by default in the settings
Example (dropdowns): Preferences -> Languages & Frameworks -> Vue
________________
| | |
Default stylesheet type: | CSS | v |
|__________|___|
| |
| - SASS |
| - Stylus |
| - Less |
|__________|
________________________
| | |
Default script type: | JavaScript (ES5) | v |
|__________________|___|
| |
| - CoffeeScript |
| - ES6/Babel |
| - TypeScript |
|__________________|
____________________
| | |
Default template type: | HTML | v |
|______________|___|
| |
| - Jade |
| - Handlebars |
|______________|
@richarddewit I want to according to Lang, and then deal with the code in tag
:+1: for dropdowns
Hi,, event I add the type = text/babel
, idea can not recognize the arrow function in the .vue
file:
However, in a pure .js script, the arrow function can be recognized:
What's going on ?
@exotfboy What JetBrains IDE do you use? WebStorm/PhpStorm/IntelliJ IDEA? Could you upload example somewhere?
@probil now webstorm eap 12 support inline sass/less . like this
it is great!
@henjue According to lang will be best.
es6/coffeescript/less/scss all have workarounds.
but <template lang="jade">
has no way to trigger syntax highlight.
Please update version to 1.0.7 1.0.7 support LESS,SASS,SCSS,Stylus,CSS,ES6,CoffeeScript,JavaScript
No, it doesn't work here either. Webstorm 11.0.4
Yeah. Plugin works strange. So, I have deleted it and use type="text/babel"
instead.
:disappointed:
Plugin rather confuses than helps.
Do not use the type attribute, use the lang,about vue-loader see http://vue-loader.vuejs.org/en/index.html
Maybe I'm still missing something. Could you attach a screenshot with your settings and fat arrows not underlined? It would be really helpful! Vue-loader is 8.3.0, thank you!
@szkrd use lang="javascript",not use "text/javascript",see http://vue-loader.vuejs.org/en/index.html
Unfortunately that didn't help :(
@szkrd I have the same problem :(
@szkrd @rockxsj @henjue The way to get es6 working is not lang="javascript", but in fact lang="babel" (not sure why this works over your official word of mouth though!)
@wafs you are my hero
@wafs thanks! upgrade webstorm to 2016.2,the bug has fixed. 👍
I have configured ES6 as default JavaScript version, but when I use ES6 syntax inside
<script>
block WebStorm lint me "error syntax".Do you have the same issue? Maybe, this could be fixed by this plugin? There is no such issue when I use
arrow function
inside *.js files