I want to show references count in Visual Studio Code. How can I do it?
Sometimes you don't want to turn it on/off completely, but toggle it on/off with a keyboard shortcut. If so, the following may help:
Install an extension: https://marketplace.visualstudio.com/items?itemName=rebornix.toggle
and configure it for your desires. (Preferences -> Keyboard Shortcuts -> keybindings.json
)
For Example for TypeScript:
{
"key": "F4",
"command": "toggle",
"when": "editorTextFocus",
"args": {
"id": "myChosenIdWhatEverItIs",
"value": [
{
"typescript.referencesCodeLens.enabled": true,
},
{
"typescript.referencesCodeLens.enabled": false,
}
]
}
}