-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Provide API commands to resolve codeLens, completion items .... #44846
Comments
tricky |
For completeness, |
@jrieken would it be easier if the API requires that the item passed to the resolve call is |
The implementation usually does that, e.g the |
I have pushed a change to the |
Is there going to be a way to resolve the item separate from this? This may be ok in some cases but ideally we wouldn't want to resolve completion items (especially for live share where there's already latency for those requests). |
Not without a major investment. To achieve that we need to expose the language feature registries (that currently live in the renderer, not extension host process). We need to expose API for all of them and we need to document/expose the internal view model and how results are merged etc. The approach currently taken is pragmatic and should yield very similar results. |
Are you planning to add this max parameter to the executeCodeLens command as well? Right now, we get Undefined as the name of codelens and so this is more important for Codelens than completion for us. Would it be possible to specify resolve all items and we can pass that if we are calling it from non-perf sensitive path. For CodeLens for eg., the indicators showing up doesn't block users and so there we could say resolve all. |
Yeah, I can try to squeeze that in |
@srivatsn I have pushed a change that allows to resolve code lenses in a similar spirit. You can pass a number, the semantics are that only so many lenses are resolved and return, e.g. no unresolved code lens is return. |
Why restrict it to a certain number instead of resolving all results (with the understanding that there's a perf cost which is probably acceptable if it's in the background)? I don't know what a reasonable number would be to pick and based on that number the experience in the editor would feel arbitrary. |
I don't know either, that's why I made it a parameter 😄 The restriction is because an unresolved code lens, so one with just a range but with a command, cannot be rendered a meaningful way. |
Sorry I am not following. My suggestion is to take a boolean parameter called resolveCodeLenses and here change it to |
Wouldn't that be the same as using |
Fair enough. My initial reaction was that a Boolean would be cleaner but on further thought this is fine. |
Verified coding up a small extension. However only did for completion items. |
VS Code provides commands to provide these data types. However if they need to be resolved later (for example on user action) there is no API to do so.
The text was updated successfully, but these errors were encountered: