junstyle / vscode-django-support

django formatter, highlight...
https://marketplace.visualstudio.com/items?itemName=junstyle.vscode-django-support
Apache License 2.0
4 stars 0 forks source link

Not respecting tabSize? #4

Closed halfnibble closed 10 months ago

halfnibble commented 1 year ago

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?

junstyle commented 1 year 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

jereze commented 1 year ago

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.

mjishnu commented 11 months ago

hey!

can you add it as a setting, like "prettier.tabWidth": 4

NatanSlvdr commented 10 months ago

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" } }

mjishnu commented 10 months ago

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

junstyle commented 10 months ago

yes. must use a prettier config file, not write in vscode settings. I will close this.

mjishnu commented 10 months ago

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