-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestions for ghost highlighting #126
Suggestions for ghost highlighting #126
Comments
Thanks for reporting. I'm in favor of these changes too. |
Thanks a lot for reporting. The decision whether something is marked as ghost or not is straightforward: The first thing I'd suggest to avoid marking lemmas as ghost unnecessarily, is to add a simple filter to the visitor implementation. Then we can avoid traversing down inside lemmas (and functions as well) and won't mark ghost statements inside these. The thing about user interaction with code selection is also very undesirable. It might be possible to resolve this by changing the color of the ghost highlighting to a transparent one: ide-vscode/src/ui/ghostDiagnosticsView.ts Lines 8 to 15 in 9ff5887
|
I recently merged a PR that re-renders ghost highlighting on the client side after every change so that it's not out of sync. Happy to reopen this issue if it persists. |
I love the new ghost-highlighting feature in the Dafny extension. This feature adds a gray background for statements that are ghost. I have two further suggestions/wishes for this mode.
I have found that
lemma
bodies are all grayed out. My first thought was that this is due lemmas always being ghost. However, in writing up this Issue, I'm finding that I can't always reproduce the situation. I have now written severallemma
orleast lemma
declarations without their bodies being turned into gray, and I've also written somemethod
bodies where the statements do turn gray (even for assignments to non-ghost out-parameters, which are definitely not ghost statements).Here's one example:
So, my assessment is now that the feature is rather unreliable. I don't understand when it's recomputing this information or what to expect.
The other issue I have is selected code doesn't show up over the gray ghost highlighting. Usually, when I select some code, it lights up with a blue background. But when the code is displayed as ghost, then the background remains gray even when I select some code. This feels wrong to me as a user. I would like the blue selection highlighting to take priority over the gray ghost highlighting.
The text was updated successfully, but these errors were encountered: