22

I don't like it this way:

It stretches code and reduces readability. Is there a way to move it to the right side and maybe even change "references" word to some icon, like this:

I researched this question, this type of question has been asked multiple times with similar suggestions to move indicator to not add lines in order to not stretch code:

But Microsoft decline it every time for some reason and I couldn't find any solution to this problem.

Did someone figure out how to move CodeLens to the side yet?

12
  • 3
    I've been part of the very first groups of trial users. We've had a lot of discussions. It's not so easy as it sounds. Especially when you have multiple indicators enabled. Plus the fact that indicators are loaded on the fly. Commented Jan 6, 2018 at 20:15
  • 2
    I've turned it off, for now. It's just in the way, because of the increased usage in vertical space combined with the fact it can change the layout while you're trying to click on things. Personally, having a small expandable icon to the left of the function would be handy, I don't really care about a preview.
    – Selmar
    Commented Nov 20, 2020 at 12:38
  • 6
    Rider does this beautifully. I don't agree with the complications Jesse listed as all the IDE needs to do is display the indicator on the same line as the type/member name, regardless of how many lines are used for parameters. It's the dev's responsibility not to have 300-char lines. If the line is too long for the CodeLens indicator, then it is too long for anything else (readability suffers, checking diffs is hard - horizontal scrollbar is a sin). Commented Aug 26, 2022 at 15:53
  • 2
    It's even worse if you add XML comments to class members, as it inserts the code lens indicator between the comment and code, making the comment look disjointed from the member it's documenting. I love the way Rider implements their equivalent of code lens, but I find myself disabling it in Visual Studio. I usually only make us of it to find members without references, but these are shaded anyway in VS.
    – user142914
    Commented Oct 11, 2022 at 8:55
  • 6
    It's a pity that in 2022 you still can't move codelens to the side like Rider. Commented Nov 11, 2022 at 1:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.