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.
您可以通过在用户设置中设置editor.codeLens
来启用或禁用代码镜头(有关更多信息,请参阅https://code.visualstudio.com/Docs/editor/editingevolved#_reference-information )。
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!
For people using any Linux OS :
File
> Preferences
> Settings
Text Editor
, search for Code Lens
and disable it.快速打开/关闭此功能的快捷方式: CTRL+SHIFT+P
Toggle TypeLens
You can Toggle CodeLens with the vscode-togglecodelens extension :
The editor.codeLens
property doesn't seem to work for F#, at least for the inline type-annotation lens. I needed to set:
"FSharp.inlayHints.typeAnnotations": false
to disable it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.