missing display on hover
Currently this is explicit disabled at
mibase.ts with the note
Hover is too hard for the moment. 2020-08-06 RJDUBNER
Showing a variable on hover is much-requested, and I understand why. However, theVSC library routines that provide the expression to be evaluated interpret dash as a separator. So, hovering over "custmas-ctr" will show up here as "custmas" or "ctr". I haven't been able to figure out how to determine that the contiguous characters behind either of them are "custmas-ctr". So, we are out of luck on hovering.
I now took the time and check where this comes from and how this can be worked around:
vscode debug browser ui used to split words by the following:
// Match any character except a set of characters which often break interesting sub-expressions
let expression: RegExp = /([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;
But since vscode 1.43 there is a new Debug hover API to let language providers - or debugging extensions - have something to say about what is an actual word that is (likely to be) resolved as an expression.
For the extension I'd normally suggest to use I've also created a PR to provide the valid COBOL naming scheme to vscode.
In general I'd say: the current disabling here should be removed - just query the data (with a limit of 1!) of what is passed to evaluateRequest
- if in your example only one match exists for "ctr" then the correct content will be shown - if there are multiple matches (are actually none) nothing is shown, but that's not up to this extension to handle other than to "not explode".
Theoretically this extension could also handle this by implementing the EvaluatableExpressionProvider
by using the known variables in the current file.