Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off CodeLens-References

I recently installed Visual Studio 2013 Ultimate. Now, as you know, there is this "n references" above all methods.

When I go to the CodeLens options, I can't disable this single feature, since the checkbox is grayed out.

Options for enabling specific Code Lenses

So how can I disable it?

like image 482
IMX Avatar asked Dec 08 '13 19:12

IMX


People also ask

How do I disable CodeLens?

To disable CodeLens invoke the File Menu's Preferences menu item and select Settings (File | Preferences | Settings): From the User page, select the Text Editor tab and scroll until the Code Lens checkbox is visible: Uncheck the Code Lens checkbox.

How do you not show references in Vscode?

Just open Visual Studio. Go in Tools > Environment > Text editor > Codelens. and then disable them .


2 Answers

Only workaround I found was un-checking the "enable codelens" option.

like image 200
Mahender Avatar answered Sep 29 '22 09:09

Mahender


The References indicator is required to be on because it is the only one that knows how to do "placeholder" items (the one that says "- references"), and is guaranteed to show up everywhere that codelens appears.

If you could turn off references, then it is highly possible that codelens would reserve space for indicators, and yet no indicators would ever appear, so you would end up with blank lines on every method/class/property that aren't real blank lines, they're just reserved space for codesense elements that will never appear.

I'd suggest using the "send a frown" thing in visual studio and commenting about this if you want to turn just references off.

like image 26
John Gardner Avatar answered Sep 29 '22 09:09

John Gardner