-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[LSP] Untangle retrieving the document identifier from the executing handler #71114
Comments
cc @CyrusNajmabadi - would like your thoughts here too |
…) via cherry-pick of PR commit. The Roslyn insertion will need to be coordinated with a Razor update to switch from the obsolete IRequestContextFactory to AbstractRequestContextFactory. Addresses dotnet#69471 and dotnet#71114
FYI, I started looking at this. |
@mgoertz-msft before you get too far, take a look at #72230 It's pretty close to done, I just wanted to push the language determination into the queue loop, instead of before. That was going to need breaking changes in clasp, so I was working on #72237 first. |
@dibarbet Thanks. I went down the other path of decoupling |
I cherry-picked your commit to try it myself and it looks like we have quite a bit of redundant data in the completion resolve item:
I believe DataId 3 is the cache index but I need to check where the explicit URIs are comming from... they are quite wasteful for a completion list. |
Oh, wait a minute, I think we checked a client capability somewhere to store the URI once for all items, but I think that may only work for VS Code and not VS. Anyway, I think we are sending it all right now, so I need to check our XAML code... |
Turns out that code was never added to our implementation in VS, so I'll have to revisit that. I like that your proposed change is at a much lower level. I have yet to see it all working together though - right now I'm getting some MissingMethodExceptions in Roslyn - clearly something's out of sync LOL |
@dibarbet do we need to do anything here? if so, assign to a milestone. if not, close out. |
As we implement allowing different LSP request handlers for different documents, its become clear that we need to move the code that retrieves the text document off of the handler itself.
This will allow us to consistently retrieve the document without specifically calling a handler that may not be appropriate for the request. For example, we would like to avoid C# completion resolve handler to find the document when resolving a XAML completion item.
We might be able to repurpose the
ITextDocumentIdentifierHandler
to untie it from a specific handler and be a separately exported LSP service that we use to resolve the textdocument before we call into a specific handler.The text was updated successfully, but these errors were encountered: