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

Auto indentation doesn't work (C#, mac) #1455

Closed
IvanSorokin opened this issue May 4, 2017 · 11 comments
Closed

Auto indentation doesn't work (C#, mac) #1455

IvanSorokin opened this issue May 4, 2017 · 11 comments

Comments

@IvanSorokin
Copy link

  • VSCode Version: Code 1.11.2 (6eaebe3b9c70406d67c97779468c324a7a95db0e, 2017-04-13T07:56:42.517Z)
  • OS Version: Darwin x64 15.0.0
  • Extensions:
Extension Author Version
csharp ms-vscode 1.9.0
mono-debug ms-vscode 0.15.5

Auto indentation doesn't work after update. Code formatting hotkey sets it, but no real time auto indentation. Tried to reinstall, no result. Settings.json is default.

http://imgur.com/zdpjV3n

@DustinCampbell
Copy link
Member

Which update are you referring to? C# for VS Code 1.9? (That update is a couple of weeks old, which is why I'm asking to clarify.)

@IvanSorokin
Copy link
Author

IvanSorokin commented May 6, 2017

@DustinCampbell, yes. Strange thing is that indentation work with {}, but not without them.

@DustinCampbell
Copy link
Member

Strange thing is that indentation work with {}, but not without them.

@IvanSorokin: I'm not sure what you meant by that. Could you share some repro steps?

@IvanSorokin
Copy link
Author

@DustinCampbell, I recorded this situation https://www.youtube.com/watch?v=pKxdup7cLgY

@DustinCampbell
Copy link
Member

I'm not sure we've ever had that level of auto-indentation in VS Code. Are you sure it worked before the update?

@IvanSorokin
Copy link
Author

@DustinCampbell, yes

@DustinCampbell
Copy link
Member

I just downloaded an older version of C# for VS Code from our GitHub releases page (1.6), and the indentation is the same.

@jrieken: Do you know if anything has changed around indentation in VS Code? AFAIK, we do't do anything special to support it in C# for VS Code. Honestly, I'm not sure there's an indentation API that we could support.

@DustinCampbell
Copy link
Member

DustinCampbell commented May 17, 2017

Out of curiosity, is the problem that you need to set the "edit.FormatOnType": true option in VS Code? I don't think we've ever handled indentation in this way, but turning that option on causes formatting to occur when typing a ; or }

@jrieken
Copy link
Contributor

jrieken commented May 18, 2017

@jrieken: Do you know if anything has changed around indentation in VS Code? AFAIK, we do't do anything special to support it in C# for VS Code. Honestly, I'm not sure there's an indentation API that we could support.

Not that I know of. @alexandrudima will know

@IvanSorokin
Copy link
Author

@DustinCampbell Thanks for workaround, it works! It seems that problem was with my settings.

@DustinCampbell
Copy link
Member

Glad to hear this worked for you. I'd love to be able to add proper indentation support. Hopefully, we'll have a way to add custom language support for indentation in VS Code at some point to allow us to have parity with VS. However, until then, I don't think there's much we can do.

@jrieken, @alexandrudima: Are there any issues on the VS Code I should track for this issue? I found microsoft/vscode#9241 and microsoft/vscode#16998.

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

No branches or pull requests

3 participants