Skip to content

[BUG]: Interference with VSCode built-in formatting #13

@MiracleBlue

Description

@MiracleBlue

Describe the bug
Hi there,

This extension seems to be interfering with some of VSCodes format-on-type features, such as brace expansion on enter.

So for example, when typing the following in a typescript file:

const thing = {<my cursor here>

Assuming your cursor is at the end of that line, hitting enter, I expect VSCode to automatically expand that to:

const thing = {
  <my cursor here>
}

However that was not happening, instead I was getting this:

const thing = {
<my cursor here>}

I kept messing with my auto formatting settings trying to figure out what was wrong, in the end when I ran bisect, it was only this extension which seemed to prevent that behaviour somehow.

To Reproduce
Steps to reproduce the behavior:

  1. Open a typescript file (.ts)
  2. Write the following text: const thing = {
  3. Press the enter key
  4. Result is not formatted properly by VSCode, ending up with:
const thing = {
}

Expected behavior
Result should end up being formatted correctly by VSCode built-in behaviour into this:

const thing = {
  <cursor here>
}

Screenshots
N/A

Additional context
Add any other context about the problem here.

Here's the output contents: https://gist.github.com/MiracleBlue/3966aa775e70cf0b69ed2700c159fbf3

Metadata

Metadata

Assignees

No one assigned

    Labels

    VScode API issueAn issue with the VScode APIbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions