-2

I don't actually know how these thins work, apparently prettier explains how to make it the main formatter on their page:

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

but i dont even know how to set this things. anyways, my question is, after i complete my writing, when i type ctrl + s (save) on my vscode, it used to make it, well, prettier. but now it doesnt change anything (and it is not pretty at all).

now, at the bottom right of the screen, i see this: what i see on my bottom right corner for prettier

and if i click that, ahem, empty set (?) image next to prettier, it becomes a double tick, but it exist my coding area and enter the output section: after i click on the thing

and if i click back to my coding area, it again becomes an, well, empty set (?) symbol.

all the help is appraciated.

ps: this is my first question, please go easy on my

sincerly

4

1 回答 1

0

您的设置中可能缺少某些内容。VSCode 允许您通过 GUI 或文本(使用 JSON 语法)编辑您的设置。使用 GUI 转到您的设置并键入:“格式”,然后确保您已启用选项“编辑器:保存时格式化”。

VSCode 配置

根据您的格式化程序设置,当您保存文件时,它应该可以按预期工作。

于 2021-10-09T16:54:34.253 回答