Skip to content

Indentation on format always defaults to 2 spaces #1493

@gbkwiatt

Description

@gbkwiatt

Describe the bug

No matter what I set in settings User/Remote/Workspace or even .editorconfig
When I trigger auto format - it always formats .svelte files with 2 spaces instead of 4 like I want to.

When manually tabbing - vscode sees 4 spaces correctly and inserts them on tab.

Reproduction

Prettier not installed.
Settings in all json files

"editor.tabSize": 4,
"editor.detectIndentation": false,
"[svelte]": {
  "editor.defaultFormatter": "svelte.svelte-vscode",
  "editor.tabSize": 4,
  "editor.detectIndentation": false,
}

.editorconfig

[{*.js, *.json, *.cjs, *.svelte, *.ts}]
indent_size = 4

Expected behaviour

on Save or on format document - it should use 4 spaces as per settings

System Info

  • OS: Windows
  • IDE: Vscode insiders

Which package is the issue about?

Svelte for VS Code

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions