OCamlPro/superbol-studio-oss

provide optional codelens for references of variables and procedures

Closed this issue · 2 comments

If enabled (not sure what the default for a setting like this should be) one would see a codelens "N references" over the definitions of variables and procedures. Clicking on it will then execute editor.action.findReferences (show the same popup as the manual way to get there).

Quite similar can be found in the MIT licensed https://github.com/spgennard/vscode_cobol/blob/main/src/vsppcodelens.ts (of course, Copyright still aplies, so if you'd end copying code, then contribution is necessary).

Was the "optional" part be implemented as well - or does it makes no sense to allow disabling the codelens for either of those (performance, possibly)?
A global disabling should be possible using editor.codeLens setting already.

I assume the option rests on the client side (VSCode). The main question seems to be whether to provide a different default for editor.codeLens in the language configuration of the extension. I would disable them, but that just personal preference. So it may be best to leave that enabled by default (otherwise people unfamiliar with VSCode might never know that feature exists) and document how disable them somewhere "easy to find".