OCamlPro / superbol-studio-oss

Open-Source part of SuperBOL Studio, including the Visual Studio Code extension and its LSP server
https://superbol.eu
Other
24 stars 13 forks source link

provide amount of references in the variable/procedure hover #354

Open GitMensch opened 3 months ago

GitMensch commented 3 months ago

While #340 is not yet released and the README wasn't update to include it, I expect to see the number of references as codeLens in the definition - at least if this definition/use is in the same file.

If there's a variable (or procedure) defined in a copybook, this will likely be not available "directly".

I suggest to add the number of references also in the hover over a variable/procedure - this allows a programmer to quickly see which effect the use of that may have. If that is possible, then it would be nice for variables to see also the kind of references, something like "references: 12" for procedures and "references: 4 target, 3 source".

I guess that the LSP has that information (otherwise cobc -t $tmp/prog.lst -Xref would have that).