Skip to content
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

Some way to hide non-generating code #459

Open
ajewellamz opened this issue Feb 12, 2024 · 1 comment
Open

Some way to hide non-generating code #459

ajewellamz opened this issue Feb 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ajewellamz
Copy link

Just a pipe dream -- I'd really like a couple of keystrokes :

One hides/shows all comments
One hides/shows all requires, ensures, assert, assume, invariant and the like.

If I use both, I'm able to see just the code that actually translates into running code in the target language, which in many cases is difficult to see through all the noise.

Of course, if that becomes one or several commands, that's fine too.

Any hope for something like that?

@keyboardDrummer keyboardDrummer added the enhancement New feature or request label Feb 13, 2024
@keyboardDrummer
Copy link
Member

Folding of lines, which VSCode supports, comes close to what you're asking for, although in folding there's always one remaining line.

I think for comments the folding should suffice, although it's currently not working for Dafny files. The Dafny server could register an LSP folding range provider and that should fix it reliably.

For ghost-code, I don't think folding would provide a good user interface. VSCode also supports virtual documents. You would invoke something like "show executed code" and it would open another tab that only shows the non-ghost code in your previous file (I would suggest with foldable comments), but you likely wouldn't be able to edit it because it's a one-way projection.

So, what you're asking for is not a pipe dream, but when we'll have time for that I can't say. I don't think it will be any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants