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

Way to "collapse all" in the IDE to close all the bodies or all the specifications #102

Open
seebees opened this issue Dec 16, 2021 · 2 comments
Labels
enhancement New feature or request language server Relates to the Dafny LSP server

Comments

@seebees
Copy link
Contributor

seebees commented Dec 16, 2021

Sometimes I want to read only the implementation,
so I want to fold all the specifications.
Other times I only care about the specifications
and I would like to fold all the bodies.

It would be nice to be able to do this for a whole file
or in a specific method.

@camrein camrein added enhancement New feature or request language server Relates to the Dafny LSP server labels Dec 20, 2021
@camrein
Copy link
Member

camrein commented Dec 20, 2021

I guess this is somewhat related to #67.
I'm hesitant about providing such a feature because it needs some user testing how reliable the folding ranges work if the document is in an unparsable state. Hence why I've only drafted dafny-lang/dafny#1549 so far.

@MikaelMayer
Copy link
Member

I'm not worried too much about unparsable state.

However, if you wanted to create your own extension or suggest a pull to the current extension, the two API to use are
editor.fold and editor.unfold
as described here
microsoft/vscode#37682 (comment)

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

No branches or pull requests

3 participants