language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Indentation is wrong when inserting initial newline since 3.1.6

Open mrleblanc101 opened this issue 2 weeks ago • 2 comments

Vue - Official extension or vue-tsc version

3.2.2

VSCode version

1.107.1

Vue version

3.5.25

System Info

System:
    OS: macOS 26.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 326.61 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.19.2 - /Users/sleblanc/.nvm/versions/node/v20.19.2/bin/node
    npm: 10.8.2 - /Users/sleblanc/.nvm/versions/node/v20.19.2/bin/npm
    pnpm: 10.14.0 - /Users/sleblanc/.nvm/versions/node/v20.19.2/bin/pnpm
  Browsers:
    Safari: 26.2

Before 3.1.6 Image

After 3.1.6 Image

Steps to reproduce

  • Create a new empty file
  • Select Vue as the langue on the bottom right
  • Type <script setup></script>
  • Press enter between the tags
  • You'll notice that the code is indented by 1 tab (4 space) when it should not

What is expected?

When inserting a new line in the <script>, the content should not be indented. Either of these settings doesn't seem to be applied.

prettier.vueIndentScriptAndStyle vue.format.script.initialIndent

Image

What is actually happening?

When pressing enter, there is a useless indentation

Link to minimal reproduction

No response

Any additional comments?

No response

mrleblanc101 avatar Jan 05 '26 21:01 mrleblanc101

Regression by bab2162

serkodev avatar Jan 06 '26 18:01 serkodev

Thanks, I'll tag the author @johnsoncodehk

mrleblanc101 avatar Jan 06 '26 18:01 mrleblanc101