question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to have code formatter accept tab and many spaces as whitespace

See original GitHub issue

There 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:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
filipwcommented, Dec 23, 2016

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.

0reactions
DustinCampbellcommented, Dec 23, 2016

Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found