I\'ve searched but didn\'t find any info on how to disable references (or the codelens completely) in the Visual Studio Code, they\'re quite useless and annoying for me.
For people using any Linux OS:
File
> Preferences
> Settings
Text Editor
, search for Code Lens
and disable
it.To specifically disable the references in the C# editor, add this to your User Settings:
"csharp.referencesCodeLens.enabled": false
This specifically hides the number of references in the C# editor while keeping the rest of CodeLens' features intact.
MotKohn also pointed out that you can use javascript.referencesCodeLens.enabled
or typescript.referencesCodeLens.enabled
below. Make sure you give them some points if that helped!
I disabled it by going to file | preferences | settings
Finally:
Workspace | Text Editor | (scroll down a little)
Step by step:
1- Press CTRL+SHIFT+P and search for "User Settings", and open settings.json file. This file sits under:
%UserProfile%\AppData\Roaming\Code\User\settings.json
2- On right panel override setting "editor.codeLens" with "false" value.
Shortcut to toggle this feature on/off quickly: CTRL+SHIFT+P
Toggle TypeLens
You can do it using a single click on VS Code. Just install the extension Setting Toggle
made by Ho-Wan on VS Code.
Once you install, click on T as shown in the image to toggle Codelens.