Home > Web Front-end > JS Tutorial > body text

Why Isn\'t Prettier Formatting My Vue Files in VS Code?

Barbara Streisand
Release: 2024-10-27 07:07:03
Original
271 people have browsed it

Why Isn't Prettier Formatting My Vue Files in VS Code?

Prettier Non-responsive in VS Code

Despite having ESlint and Prettier installed and enabled in your Nuxt application, attempting to format a .vue file in Visual Studio Code using the CMD Shift P shortcut and selecting "Format Document" has no effect.

Debug:

To address this issue, consider the following steps:

  1. Navigate to File -> Preferences -> Settings (Ctrl comma) and conduct a search for "formatter."
  2. Designate Prettier as the Default formatter. If this proves unsuccessful, follow the alternative method:
  3. Utilize the shortcut ctrl shift p to access "Format Document With..." > Configure Default Formatter... > Prettier - Code formatter.

Alternatively, the shortcut ctrl shift I can also accomplish the same result.

The above is the detailed content of Why Isn\'t Prettier Formatting My Vue Files in VS Code?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!