Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect indentation character(s) used when formatting code #1574

Closed
smarts opened this issue Jun 16, 2017 · 5 comments
Closed

Incorrect indentation character(s) used when formatting code #1574

smarts opened this issue Jun 16, 2017 · 5 comments

Comments

@smarts
Copy link

smarts commented Jun 16, 2017

Environment data

dotnet --info output: (this has nothing to do with compilation)
VS Code version: 1.13.1
C# Extension version: 1.10.0

Steps to reproduce

  1. VS Code [relevant] defaultsetting:
{
  "editor.detectIndentation": true,
  "editor.insertSpaces": true,
  "editor.tabSize": 4,
}
  1. VS code user settings:
{
  "editor.insertSpaces": false,
  "[csharp]": {
    "editor.insertSpaces": true
  }
}
  1. open a C# file that uses spaces for indentation
  2. format the document (alt-shift-f on Windows or right-click in the document and choose Format Document)

Expected behavior

the configured indentation is used:

indentation strategy <= [
  detected indentation strategy,
  language-specific indentation strategy,
  global indentation strategy].firstNonEmptyValue()

Actual behavior

tabs are used for indentation in C# files - (i assume it's just using the global editor.insertSpaces value, ignoring editor.detectIndentation and the language-specific editor.insertSpaces.)

@DustinCampbell
Copy link
Member

Looking at the change that was merged, no that's not possible. Could you file a new issue with the settings that you have specified?

@Aciho
Copy link

Aciho commented Aug 11, 2017

I could do that. Or I could just update to 1.15 🤦

@DustinCampbell
Copy link
Member

Sorry, I don't understand your reply. Does that fix the issue?

@Aciho
Copy link

Aciho commented Aug 11, 2017

Yeah, I was just using an old version. Sorry to bother you.

@DustinCampbell
Copy link
Member

Ah - got it! No worries! Glad you got it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants