Today, I will share 6 VSCode extensions necessary for Vue3 development, which can be installed and used directly through the VSCode extension center.
If you find it helpful, please like and support it~
1. Volar
🔥 1.53 million downloads+
I believe that students who use VSCode to develop Vue2 must be familiar with the Vetur extension. As a VSCode extension supporting Vue2, its main function is to provide highlighting, syntax support and syntax detection for Vue single-file components.
With the release of the official version of Vue3, the Vue team officially recommends the Volar extension to replace the Vetur extension, which not only supports Vue3 language highlighting, syntax detection, Also supports TypeScript and type checking based on vue-tsc.
Note when using:
- First, disable the Vetur extension to avoid conflicts;
- It is recommended to use
css
/less
/scss
as the language for<style>
, because these are based on vscode-css-language the service provides reliable language support; - If using
postcss
/stylus
/sass
, additional syntax highlighting extensions need to be installed. postcss uses language-postcss, stylus uses language-stylus extension, sass uses Sass extension; - Volar does not contain ESLint and Prettier, while the official ESLint and Prettier extension supports Vue, so you need to install it yourself.
2. Vue VSCode Snippets
🔥 1.52 million downloads+
Vue VSCode Snippets extension aims to provide developers with the easiest and fastest way to generate Vue code snippets, through various shortcuts key to quickly generate various code snippets in .vue
files. It is simply a must-have artifact for Vue3 development.
This extension supports: Volar, Vue2 and Vue3.
It is used as follows:
- Create a
.vue
file and entervbase
to prompt the generated template content:
- Type
vfor
to quickly generate av-for
command template:
- Type
v3onmounted
to quickly generate theonMounted
lifecycle function:
Others will not be demonstrated anymore. The functions are too powerful, and there are many commonly used shortcut keys. For details, you can check the document.
3. Auto Close Tag
🔥 7.69 million downloads+
The Auto Close Tag extension is a great VS Code extension that has a big impact on productivity. As the name suggests, when we type the closing bracket in the closing tag, it will add the closing tag. It supports HTML, Handlebars, XML, PHP, Vue, JavaScript, Typescript, JSX and more.
4. Vue Peek
🔥 490k+ downloads
Vue Peek Extension is used to expand the Vue code editing experience, allowing us to quickly jump to the files defined by components and modules.
It is used as follows:
- Right-click the component label to jump to the component definition file:
- Right-click the component label, and a pop-up window displays the file defined by the component:
5. Vue Theme
🔥 340k downloads+
Vue Theme extension provides a good Vue theme, and also supports configuring different colors, which feels pretty good.
6. Vite
🔥 89k+ downloads
The Vite extension allows us to automatically start the development server after opening the project, allowing developers to preview and debug the application without leaving the editor . Support one-click to start, build and restart projects.
Summarize
The 6 extensions shared today can be installed and used as needed.
I highly recommend Practical Volar and Vue VSCode Snippets These 2 extensions.
If you think it's good, please like and support. 👍
If you have a better extension, welcome to comment and share~🔥
✨follow me:https://medium.com/@Chris1993
Top comments (1)
Hello, can I translate your article into Chinese so that more people can see your article, I will include the original address, thank you very much.