
The "references" option inline is rather cumbersome when editing, could there be an option to not display it?
Yes I think it's doable...but a bit tricky
We've been discussing about not displaying the 0 references label as it's completely useless, but we realized it would require eagerly computing all references early, which would kill performance. We haven't found a good solution for that (eg. returning a blank references label instead of 0 references still adds blank lines to the editor, so it's not ideal either).
As for preferences, ideally, the server would receive the preferences and then declare whether it's capable of returning these references (aka CodeLenses), on startup. But that is not possible. That means we could have the preferences working but Codelens queries would still be emitted toward the server. It's probably acceptable though.
Finally, I think there's something being worked on on the VS Code side, that would allow to dynamically set the server capabilities, but I think @gorkem knows more about that.
Thanks for the quick response. Would it be realistic to have an option to disable showing CodeLenses altogether in the mean time? There's already the option to view references on demand.
@mooman219 yeah I think so, it's pretty straightforward to implement, but I want to discuss with @gorkem first, before introducing new preferences that might get deprecated soon
The new register/unregisterCapability calls will allow us to have a cleaner solution but for now receiving a single call per file should not be a problem. I think we can use
java.referencesCodeLens.enabled to align with typescript.
There:

@gorkem since vscode has typescript reference codelenses disabled by default, should vscode-java do the same, to stay consistent?
i was using vs code for unity at the moment and i disabled it by
"csharp.referencesCodeLens.enabled": false
in my workspace setting
Also "editor.codeLens" can be set to false.
Just open Visual Studio.
Go in Tools > Environment > Text editor > Codelens.
and then disable them .
https://youtu.be/XHI3_dfYFtY
I got solution from this video .
Hope it helps You too :)
Most helpful comment
i was using vs code for unity at the moment and i disabled it by
"csharp.referencesCodeLens.enabled": falsein my workspace setting