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 #26

Closed
jrieken opened this issue Feb 1, 2016 · 3 comments
Closed

Trouble with editor.action.format #26

jrieken opened this issue Feb 1, 2016 · 3 comments

Comments

@jrieken
Copy link
Contributor

jrieken commented Feb 1, 2016

From @TJSoftware on January 29, 2016 17:35

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

Copied from original issue: microsoft/vscode#2554

@jrieken jrieken self-assigned this Feb 1, 2016
@jrieken
Copy link
Contributor Author

jrieken commented Feb 1, 2016

From @aeschli on February 1, 2016 11:3

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

@TJSoftware
Copy link

@jrieken I am not using an extension, I had found a StackOverflow post, just noticed it is your post of what VSCode supports for formatting and I was going off that as I could not find that information from https://github.com/Microsoft/vscode or https://code.visualstudio.com/docs. Thank you for looking into this. Please let me know if you need anything else to help recreate the C# example

@jrieken
Copy link
Contributor Author

jrieken commented Feb 5, 2016

#24

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

2 participants