VSCode plugin formatting no longer uses editor `tabSize` configuration when indenting blocks
See original GitHub issueBug description
Prior to v3.6, the VSCode extension would indent blocks with a tab size that would take into consideration editor / user settings.
How to reproduce
Using v3.6
- Add a non-2 tabsize configuration to
settings.json"[prisma]": { "editor.defaultFormatter": "Prisma.prisma", "editor.tabSize": 4, }, - Format the a prisma schema using VSCode
- The blocks will be formatted with a tab size of 2, ignoring the VSCode
tabSizeconfiguration
Expected behavior
The formatted code’s block indention would match the tab size specified in the user / editor settings.
Using v3.5
- Add a non-2 tabsize configuration to
settings.json"[prisma]": { "editor.defaultFormatter": "Prisma.prisma", "editor.tabSize": 4, }, - Format the a prisma schema using VSCode
- The blocks will be formatted with a tab size of 4, honoring the VSCode
tabSizeconfiguration
Prisma information
N/A
Environment & setup
- Editor: VSCode
- Editor version: 1.62.3
- Extension version: 3.6
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Visual Studio Code: format is not using indent settings
If it is the case, then just open Command Palette, type "Formatter" and select Formatter Config . Then edit the value of "indent_size"...
Read more >VS Code tips — Indentation settings and the ... - YouTube
VS Code shows the indentation settings for the current in the status bar. Click on this entry to quickly change the tab size...
Read more >User and Workspace Settings - Visual Studio Code
To open the Settings editor, use the following VS Code menu command: On Windows/Linux - File > Preferences > Settings; On macOS -...
Read more >Basic Editing in Visual Studio Code
Learn about the basic editing features of Visual Studio Code. Search, multiple selection, code formatting.
Read more >VS Code API | Visual Studio Code Extension API
Custom documents are only used within a given CustomEditorProvider . The lifecycle of a CustomDocument is managed by the editor. When no more...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I can confirm this as a regression.
Note for anyone else on the team: Make sure to use tabs for indentation instead of spaces when you try to reproduce this. You can find that setting on bottom right hand of the editor.
No, it will be fixed in 3.8.0. You can try it out using the
Prisma - Insiderextension from the marketplace already.