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

Question: Is it possible to replicate Visual Studio folding behaviour? #116

Open
Sensuikan-U511 opened this issue Jun 4, 2024 · 1 comment

Comments

@Sensuikan-U511
Copy link

Sensuikan-U511 commented Jun 4, 2024

Considering the line above a free-standing opening bracket as the parent for folding. Like so:

2024-06-04 13_02_45
2024-06-04 13_02_51

Whereas the experience in VSCode is considerably worse:
2024-06-04 13_19_33
2024-06-04 13_19_36

Aside from folding at the wrong point, leaving twice as much vertical space consumed (which is the main thing I'm concerned with), VSCode also does a worse job of hiding the bracket; Visual Studio greys out the entire hidden {...};, while VSCode shows a white { with a greyed out ... which stands out strangely.

I'm aware that I can put the bracket on the same line as its parent, but changing my entire style of coding is painful. It's hard to go back to Visual Studio after having gotten VSCode almost perfectly configured to my tastes, so it would be wonderful if there were a solution to my folding woes, as it's the only sore point I have.

@daiyam
Copy link
Member

daiyam commented Jun 4, 2024

Hi, the current extension only provides a list of folding range to VSCode.
So it would need a new extension which would change how the foldings are displayed.
But sadly, one of the issue is that an extension doesn't have access to a language properties (so no way to know how to recreate the foldings).

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

No branches or pull requests

2 participants