About the stylus in the Template file
-
Webstorm can’t recongnize the code
<style lang="stylus">
, we can change it like this:<style lang="stylus" type="text/stylus" scoped> </style>
And then, Webstorm will format the codes properly.
-
Thanks, I use webstorm and had just accepted that I would have to make do with it throwing errors. This is very helpful!
-
Cloud9 (Ace editor) also has issues with the Stylus part of our .vue files.
Adding type=“text/stylus” doesn’t change anything in this scenario.
If the file (or project) is set to HTML mode, the editor’s inline linter will go crazy.
If the file is set to Javascript mode, the linter will relax, but you’ll get no highlighting.
If the file is set to Typescript mode, you’ll get acceptable Stylus highlighting.I hope there will soon be a Vue mode available with syntax highlighting and maybe even code completion.
But for now, Typescript is the mode to use on c9 for our .vue files.
-
I’m curious what trouble you saw in webstorm with the formatting. I was seeing some and then I realized it was related to the comments positioning. I may have to give that a shot to see if it takes care of that as well.