How to remove the reference count in vscode?
Asked
Active
Viewed 6,860 times
10
-
1Does this answer your question? [Visual Studio 2017: Display method references](https://stackoverflow.com/questions/42796941/visual-studio-2017-display-method-references) – dmedine Jul 16 '21 at 03:18
-
@dmedine Visual Studio Code, not Visual Studio – ProgrammingLlama Jul 16 '21 at 03:26
-
@Llama I guess that answer isn't very helpful then. – dmedine Jul 16 '21 at 03:39
2 Answers
29
If you only need to disable code references for C#, you can do this by using vs code settings or by changing the user settings file.
- Via VS Code settings: Go to File > Preferences > Settings and search for "csharp.referencesCodeLens.enabled" and make sure its unchecked.
Editing the settings file: Go to your user settings file which is in following path:
%UserProfile%\AppData\Roaming\Code\User\settings.json
Edit following attribute to false to disable code reference count:
"csharp.referencesCodeLens.enabled": false

Olivier Jacot-Descombes
- 104,806
- 13
- 138
- 188

Rukshán Dikovita
- 494
- 6
- 10
-
1vscode has a settings editor. No need to manually edit config files. – Mike Lischke Jul 16 '21 at 07:02
-
1@MikeLischke yes, you are right, we can change that directly from settings as well. I have edited the answer as well. thanks! – Rukshán Dikovita Jul 16 '21 at 07:13
3
Vue.js have this too in the Volar extension, if u want to disable, you can just add this line on your settings.json:
"volar.codeLens.references": false
Or search for it on settings menu instead :)

Thiago Silva Lopes
- 31
- 3