And install:
-
Todo Tree
-
Material Icon Theme
- and select the icon set
-
Material Theme
- and select
Material Theme Darker High Contrast
- and select
-
Material Theme Icons
-
Prettier - Coder Formatter
- and set as default formatter
-
ESLint
-
Vue docs
-
Vue Language Features (Volar)
-
TypeScript Vue Plugin (Volar)
-
Vue 3 Snippets
-
Vue VSCode Snippets
-
advanced-new-file
: to create new file from the command palette. -
Tailwind CSS IntelliSense
- and add a
tailwind.config.js
file to enable in the root of the project:
module.exports = { content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], theme: { extend: {}, }, plugins: [], };
- and enable
Editor: Quick Suggestions
withstring
toon
- and add a
-
CSS Navigation
-
NPM Browser
to view dependencies and the available versions.
The prerequisite is to enable Prettier extension.
Run in Terminal npx prettier --write .
Run in Terminal npx prettier --check .
The prerequisite is to enable ESLint extension.
Then, in the User settings in JSON, add the following:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
Read more in the docs:
Instead of using console.log
, use the built-in JavaScript debugger.
With CTRL+SHIFT+P:
Setting UI
and search formargin
- check the
Editor: Glyph Margin
to enable breakpoints.
- check the
- open a
Debug: JavaScript Debug Terminal
- run
npm run dev
and click the link in the Terminal.
- run
IMPORTANT : do not enter the URL yourself so that the debugging works.
On a breakpoint, you can set conditions, like post.id === 10
. It can be very handy to skip data or go straight to the issue.
Learn the CTRL+P
and type the file name you are looking for.
It is the one to learn if you need to learn one shortcut.
With advanced-new-file
:
CTRL+ALT+N
- type and select the destination folder
- type the file name.
- BOOM!
Emmet allows us to scaffold HTML code quickly with a CSS-like syntax.
For example:
section.section-class>article#article-id
becomes the following on tab:
<section class="section-class">
<article id="article-id"></article>
</section>
section.section-class>article*4#id-$
becomes the following on tab:
<section class="section-class">
<article id="id-1"></article>
<article id="id-2"></article>
<article id="id-3"></article>
<article id="id-4"></article>
</section>
section.section-class>article*4#id-${Item $}
becomes the following on tab:
<section class="section-class">
<article id="id-1">Item 1</article>
<article id="id-2">Item 2</article>
<article id="id-3">Item 3</article>
<article id="id-4">Item 4</article>
</section>
Read more in the docs.
When you edit a DOM element in the template, for example, changing a <div>... </div>
to <p>... </p>
, the default is not change the closing tag in VSC.
To enable the option to update the closing tag, go to the Settings UI and search linked editing
and check the option.
Next time you rename a element, the closing tag will update.
To show inputs and output expected and returned by methods or functions, you can:
-
enable
JavaScript > Inlay Hints > Function Like Return Types
TypeScript > Inlay Hints > Function Like Return Types
-
and configure:
-
JavaScript > Inlay Hints > Parameter Names
toall
-
TypeScript > Inlay Hints > Parameter Names
toall