-
Notifications
You must be signed in to change notification settings - Fork 31k
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
add custom folding strategy #54200
add custom folding strategy #54200
Conversation
… when TOC is hidden
Needed to understand which type of refactorings are most used so we can decided which bugs to prioritize and which new refactoring areas to invest in
Let the base text editor model be readonly by default unless the model handle is of "untitled://".
@daiyam Thanks a lot for the PR. Please give me some time to review, I'm buried in some other work, but will get to this right after. |
@daiyam If you plan to work on the PR again, maybe it's better to start a new one. Something is off. As mentioned, revert the changes to folding.ts, but add the code to select the provider in SyntaxRangeProvider. |
@aeschli Ya, I can filter out the providers inside the |
@aeschli If the changes are ok, I will make another PR. Thx |
hi @aeschli , pinging for updates 😇 |
An alternative way would be to go the same way we went for formatting:
Would that work for your use case? I`d prefer that solution give we already use the approach for formatting where it worked well. |
My personal use case is:
The main issue is that VSCode the foldings defined by the language provider can't be disabled. There is an additional issue where we can't define the priority of the folding providers. I have a newer version of the PR where the users can finely tune which folding providers to use (doc) |
@daiyam Can you confirm that the proposal as described in #54200 (comment) will help you? Users could set your folding provider as the default. Your provider can offer additional options such as 'explicit and indentation' etc. It would mean that you reimplement the indentation strategy, but IMO that's acceptable. |
@aeschli Yes, your proposal would work. For |
@aeschli Do you want me to make a new PR with your proposal? |
@daiyam Yes that would be great! |
Hello,
This PR has been discussed with @aeschli at #53910