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.
相关问题
- Extended message for commit via Visual Studio Code
- Where are Automatic Type Acquisition typescript de
- Typescript: Why doesn't visual studio code rep
- .NET Core 3.1 CreateHostBuilder Cannot parse JSON
- How to get VS Code debug data like breakpoints, st
相关文章
- Visual Studio Code, MAC OS X, OmniSharp server is
- Omnisharp in VS Code produces a lot of warnings ab
- Visual Studio Code command for “repeat last comman
- VSCode remove warnings from problems tab
- Configure a TypeScript project with common depende
- Visual Studio Code disabling Normal, Edit and Visu
- Vscode: error TS2307: Cannot find module 'vsco
- How to customize context menu in Visual Studio Cod
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
ortypescript.referencesCodeLens.enabled
below. Make sure you give them some points if that helped!Shortcut to toggle this feature on/off quickly:
CTRL+SHIFT+P
Toggle TypeLens
I disabled it by going to
file | preferences | settings
Finally:
Update: in the new settings editor of VSCode, it's as simple as typing codelens in the search and ticking the first checkbox in the results:
For me, the setting that fixed it was:
"editor.codeLens": false
in my user preferences json file.
You can Toggle CodeLens with the vscode-togglecodelens extension:
Gif: Toggle CodeLens without modifying settings files
Step by step:
1- Press CTRL+SHIFT+P and search for "User Settings", and open settings.json file. This file sits under:
2- On right panel override setting "editor.codeLens" with "false" value.