Open tjprescott opened 2 years ago
We wanted it to work this way and we tried to do this, but it seems that we can't control what is shown when a range is collapsed from language server and we end up seeing only the first decorator and not the op. So we made the decision to collapse decorators separately.
I think it's easier with some visual on what is collapsible and best shown with multiple lines of decorators and multiple lines of op
declaration.
v @A
@B
@C
v op myOp(
param: string): void;
> @A ...
> op myOp( ...
It's worth noting that the handling of decorators as their own collapsible region is the same as TS does for comments.
Ooh, the latest version of LSP supports setting the collapsed text!
I was about to link to this and show that it did not and that we'd have to ask for a feature, but looks like it's there now. Yay.
pri: 2, est: 3
Unfortunately, collapsedText doesn't seem to be supported on the client side yet. I tried upgrading our packages and returning it but it didn't have an impact. :(
Marking this as blocked in the project for now until I get an answer on that.
Moving to backlog as this is not possible to implement for VS Code yet. I will continue to engage on linked issue and figure out how to request and track the dependency.
https://github.com/microsoft/vscode/issues/70794 is the tracking issue on vscode. Consider upvoting there. We're blocked on that.
cc @johanste
We could consider implementing this for editors that have the capability by checking the capability. This would include at least Visual Studio classic, it appears. Then in theory if the capability ever shows up in VS Code it would start working right away.
VSCode has tooling that lets you collapse the decorator block, but it compresses it does to a single decorator line. The architects expected to show no decorators.
uncollapsed
current collapsed
expected collapsed