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

Trouble with editor.action.format #2554

Closed
TJSoftware opened this issue Jan 29, 2016 · 2 comments
Closed

Trouble with editor.action.format #2554

TJSoftware opened this issue Jan 29, 2016 · 2 comments
Assignees

Comments

@TJSoftware
Copy link

Summary

I am unable to format code for xml and c#. json and javascript do not have any issues.

What I have done

Originally I modified my editor.tabSize to be 2 (in workspace). I removed this override and just left in the defaults. I also overwrote the keybinding for editor.action.format to use ctrl+k ctrl+d. I also removed those and left just the default in. Working with test files of each type mentioned above I am able to format some file types, but not others. This does not seem to be dependent on any of my settings, I have just added that information in just in case it is relevant.

C# example - what I expect

The following screenshot the brackets should line up in MyClass.

In this case while the tab size is set to 2 I would also expect that MyClass would be moved left to adjust to the correct tab size.

Officially the starting bracket would be on the same line as the class definition for my company policy, but I do not see that option available. Bonus points if you can mention how to set this in VSCode. VS Enterprise was able to do this with just a checkbox in settings, I am ok with a bool in json, I just do not see the value anywhere.

image

XML example - what I expect

Here I expect that subLevel3 would be tabbed in to whatever the current tab setting is.
image

Tech Specs

Windows 10 Pro
image

@aeschli
Copy link
Contributor

aeschli commented Feb 1, 2016

VSCode has not built-in XML formatter. Do you use an extension?
If yes, can you file the issue against that extension?

We're using this issue for the C# issue

@jrieken
Copy link
Member

jrieken commented Feb 1, 2016

This issue was moved to dotnet/vscode-csharp#26

@jrieken jrieken closed this as completed Feb 1, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants