-
Notifications
You must be signed in to change notification settings - Fork 417
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
Improve formatting options experience #366
Comments
This is because OmniSharp doesn't support per request formatting options (https://github.com/OmniSharp/omnisharp-roslyn/blob/master/src/OmniSharp.Abstractions/Models/v1/FormatRangeRequest.cs#L6). Moving to OmniSharp for that. |
@anfomin - to workaround this, you can create an |
@jrieken I tried to create {
"TextEditorOptions": {
"tabsToSpaces": false
}
} But |
I have found file I needed: {
"FormattingOptions": {
"useTabs": true
}
} Now it's OK. |
The method posted above doesn't seem to work anymore. |
here is a new wiki article I just posted today, hopefully this helps When the new C# Extension for VS Code is released, the VS Code intendation/tab settings will be inherited by OmniSharp automatically. |
There are two things that we need to support to improve the experience.
|
I can go ahead and implement this |
I'm not so sure that omnisharp itself was normally listening to files changed in workspace, or is it? Also if there are per request formatting options supported. What would happen to omnisharp.json when there is command to change? Would it keep track of change? What would happen if we have omnisharp.json to set tabSize to 2 Another scenario is In my opinion omnisharp.json should track all configurations values that changed from default in workspace |
Not sure exactly what's wrong here, but when I run code formatting it uses 4 space indentations. Other formatting options seem to work, like Side note, the casing for omnisharp.json on the wiki file (https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration%20Options) seems to be inconsistent, too. FormattingOptions is sometimes pascal-cased and sometimes camel-cased, as is TabSize, in different areas of the file. I guess it doesn't change anything because I tried all possible combinations but none worked for me, you may want to mention that it's agnostic if it actually is. Other than that issue, the wiki article is pretty clear, so nice job |
I will close this as implemented.
|
From @anfomin on December 14, 2015 17:34
I've configured VS Code to always use tabs:
But C# Format Code command (Shift+Alt+F) always replaces tabs with spaces. I'm using OS X El Capitan.
Copied from original issue: microsoft/vscode#1300
The text was updated successfully, but these errors were encountered: