indentguide icon indicating copy to clipboard operation
indentguide copied to clipboard

Guides on empty lines, no way to fix

Open Kiefy opened this issue 4 years ago • 1 comments

With Show guides on empty lines enabled, I get all of these unwanted guides on empty lines. makes some sense I suppose. get what you ask for and all that.

Guides on empty lines

But if I disable Show guides on empty lines, it breaks the guides completely:

No Guides on empty lines

There doesn't appear to be any combination of behaviour settings that can correct this. Weirdly seems to be a common issue in various editors & plugins I have used. Visual Studio's built-in line guides are exactly how I want, but of course, lack any configurability.

To further illustrate what I would like to achieve:

No Guides on empty lines

Pay no attention to the colors of the guides themselves. It's an unfortunate coincidence that they also happen to be green & red.

Kiefy avatar Oct 23 '20 22:10 Kiefy

It's been many years since I've looked at the logic for the indents, but you may just have to tweak some of the other settings.

The main difference between my extension and the built-in VS one is that mine doesn't semantically understand the code at all. It's simply looking at the number of spaces at the start of the line (and the empty line option just checks for there being nothing other than spaces/tabs on the line). Everything else is inferred from the other options.

Whereas VS's requires each language to provide the data necessary in order to draw the correct line, so you don't get any guides until the language team receives enough feedback that they should prioritise implementing it. So that's the tradeoff. You could try asking the VS team to make their guides more configurable? (I honestly don't mind, it's kinda cool to have a super popular extension for VS, but if the core functionality covers it then I'm happy for this one to be retired.)

zooba avatar Apr 14 '21 11:04 zooba