简体   繁体   中英

how to remove prettier code-formatter plugin completely in vs code?

I uninstall the prettier code-formatter plugin by uninstalling button but when I save the react js file it automatically formats the code.

Here what setting.json file looks like

{
"workbench.iconTheme": "material-icon-theme",
"window.zoomLevel": 1,
"editor.fontFamily": "Monaco, Menlo, 'Courier New', monospace",
"files.autoSave": "afterDelay",
"npm.enableScriptExplorer": true,
"[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"debug.node.autoAttach": "on",
"diffEditor.ignoreTrimWhitespace": true,
"window.zoomLevel": 2,
"prettier.jsxSingleQuote": true,
"editor.codeActionsOnSave": {
    "source.organizeImports": true
},
"editor.formatOnSave": true,
"prettier.endOfLine": "auto",
"eslint.autoFixOnSave": true,
"git.autofetch": true,
"[ruby]": {},
"terminal.integrated.shell.osx": "/bin/bash"

}

I want to know how to get rid of the esbenp.prettier-vscode .

open command palette > Format Document With... > Configure Default Formatter

You need to have an HTML file open in your active tab. That should give you the option of picking the builtin HTML language features and consequently change the value of the respective setting in your JSON.

To disable formatting altogether you need to uncheck "Format On Save" and "Format on Type" or edit the respective "editor.formatOnSave" and "editor.formatOnType" fields with a false value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM