Is it possible to have code formatter accept tab and many spaces as whitespace
See original GitHub issueThere are option SpaceBeforeXXX
which only accept true/false
But sometimes I was using tab to make space before operator, =
and +=
's family operator in particular
But formatter always convert it to space and code alignment I used was gone
So I wish that formatter about spacing that set to true will just see that tab, tabs, and spaces is also whitespace and ignore it if it is there, else will insert a space into it
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
What is the difference between using tab and space when we ...
Some people prefer spaces and some prefer tabs. Its a matter of preference and many folks have different reasons for it.
Read more >Virtual Formatter – Fixing Tabs versus Spaces and other ...
Another important note to make is that the virtual formatting style only allows you to change settings related to indentation and spacing. This ......
Read more >Whitespace, tabs, and indenting code - Visual Studio Tutorial
I've got two tabs at the beginning of the line and spaces at the end of the line. Nobody likes these mixed tabs...
Read more >Tabs versus spaces—what is the proper indentation character ...
The coding standards for the code hosted in drupal.org suggest to use two spaces to indent the code; other sites suggest to use...
Read more >Chapter 3 - Code Formatting with Black - Invent with Python
Indentation is the whitespace at the beginning of a code line. You can use one of two whitespace characters, a space or a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These are all the options that OmniSharp can deal with at the moment https://github.com/OmniSharp/omnisharp-roslyn/blob/dev/src/OmniSharp.Abstractions/Options/FormattingOptions.cs
However, those are actually just forwarding to Roslyn https://github.com/dotnet/roslyn/blob/master/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs
What you are trying to do (with the smart alignment) is not possible at this time in OmniSharp - and as a feature request, it sounds to me like it actually belongs into Roslyn itself.
Thanks!