4 ms·
Author of vetur[0] here, glad to see it getting featured :-) Started this plugin last October to provide better editor support for Vue single file component, n
by octref 9y ago
Author of vetur[0] here, glad to see it getting featured :-)
Started this plugin last October to provide better editor support for Vue single file component, now vetur has support for embedded IntelliSense / error-checking / syntax-highlighting / emmet / snippet / linting / formatting. By embedded support I mean each feature is available for at least html/css/js, some features are also available for scss/less/ts/etc.
@sandersn from TS team has been really helpful in helping me integrating TS's Language Server to powers the advanced IntelliSense in vetur. As vue / vuex / vue-router now comes with type definitions, you get awesome auto completion such as [1] and [2].
Now that IntelliSense in js/ts sections is almost complete, vetur's next step is to use TS's Language Server to extract info from Vue SFC's script part to power IntelliSense in templates, such as prompting a list of `props` for `v-if`, and prompting a list of `methods` for `@click`.
Give it a try and let me know any bugs or features you want to see!
[0]: https://github.com/octref/vetur https://github.com/octref/vetur
[1]: https://twitter.com/octref/status/854812632142024705 https://twitter.com/octref/status/854812632142024705
[2]: https://twitter.com/octref/status/857350977581723648 https://twitter.com/octref/status/857350977581723648
- ronjouch 9y agoVetur is awesome! Thanks octref for your continued work and support :) The "feature" I'd like to see most is a "perfect setup" guide (or maybe auto-detecting-and-helping logic?) detailing what's required to get all the features working. Currently for example I don't get HTML/CSS formatting, even though it was featured in 0.6.0 changelog, but I have no idea why :-/ . Got this feeling a few times with vetur as well as other linters: things work, but maybe not 100%, and it can be opaque to dig deeper: is it due to vscode misconfiguration? vetur misconfiguration? missing tooling? I don't know. EDIT: these TS-dependent auto-completions look fantastic. I'm planning to migrate my current Vue project to TS, but for now it's just JS. Do you have any recommendation for Vue2-with-TypeScript documentation? Or, even better, a JS-to-TS Vue2 migration guide?
- crooked-v 9y agoTo go with this, I would be incredibly happy just to find a complete guide for Webpack + Babel + TS + Vue. The last time I tried I could never quite get anything put together all the way.
- octref 9y agoI'll write a blog post about a recommended setup soon. Indeed there are some configuration required for getting all the features working, and they aren't really well-documented now.