Skip to content

Format Code appears to indent differently than expected #7503

@dbaeumer

Description

@dbaeumer

From @brennanMKE on March 11, 2016 20:0

I'd like to know if this can be configured with a workspace setting. I have tried adjusting editor.wrappingIndent but it does not appear to influence behavior. Below I have examples that you can try yourself.

Either there is a bug in configuring workspace settings or there is no way to configure this behavior. My team is using different IDEs for TypeScript and I want to make my settings match what the rest of the team is expecting.

My .vscode/settings.json

{
    "editor.tabSize": 2,
    "editor.insertSpaces": true,
    "editor.wrappingIndent": "same"
}

Extra Indenting (Things.ts)

export let Things = [{
  Hat: 'hat',
  Glove: 'glove',
  Umbrella: 'umbrella'
},
  {
    Salad: 'salad',
    Burrito: 'burrito',
    Pie: 'pie'
  }];

Expected Indenting (Things.ts)

export let Things = [{
  Hat: 'hat',
  Glove: 'glove',
  Umbrella: 'umbrella'
},
{
  Salad: 'salad',
  Burrito: 'burrito',
  Pie: 'pie'
}];

Copied from original issue: microsoft/vscode#4036

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions