Closed halfnibble closed 10 months ago
formatted by prettier, can automatic search prettier config file in the dirs, such as .prettierrc, .prettier.json...;
you can reference prettier. how to set tabsize
Hi everyone,
I'm experiencing a different issue but maybe similar as halfnibble. I added a .prettierrc
in the root folder (and also in several subfolders just in case) but the formatter does not seem to respect my configuration.
Thanks!
EDIT : my bad, error on my side, after restarting again VScode I can confirm adding a .prettierrc
works.
hey!
can you add it as a setting, like "prettier.tabWidth": 4
Hello, same issue, i get some indents with 4 spaces and other with 2.
Prettier works fine on other files with the right settings :
{ "prettier.useTabs": true, "python.analysis.completeFunctionParens": true, "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.insertSpaces": false, "editor.tabCompletion": "on", "editor.detectIndentation": false, "editor.indentSize": "tabSize", "editor.formatOnType": true, "prettier.tabWidth": 4, "[django-html]": { "editor.formatOnSave": true, "editor.defaultFormatter": "junstyle.vscode-django-support" } }
Hello, same issue, i get some indents with 4 spaces and other with 2. Prettier works fine on other files with the right settings :
{ "prettier.useTabs": true, "python.analysis.completeFunctionParens": true, "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.insertSpaces": false, "editor.tabCompletion": "on", "editor.detectIndentation": false, "editor.indentSize": "tabSize", "editor.formatOnType": true, "prettier.tabWidth": 4, "[django-html]": { "editor.formatOnSave": true, "editor.defaultFormatter": "junstyle.vscode-django-support" } }
use .prettierrc file it can act as a temp fix
yes. must use a prettier config file, not write in vscode settings. I will close this.
yes. must use a prettier config file, not write in vscode settings. I will close this.
hello, can it be possible to also respect setting from vscode settings in future
I've configured VSCode to use 4 spaces, but the formatter does not appear to respect my setting.
Is there something I am doing wrong?