-
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
Go to Definition fails over LSP for source generated files #69595
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@davidwengier Nothing to do with the new URI code; this just isn't supported yet. The support is coming with #68771 and dotnet/vscode-csharp#5858. |
Thanks, I was just about to comment that realisation, now that I've had time to think. I was so excited to get an exception investigating that competition issue, I just logged it right away :) |
Feel free to close this as a dupe, though I have to ask - is that PR going to make things work in VS? Thats where I hit this, from a Razor file. |
Oh I thought that was VS Code. Uh, regular VS will require some different work, so let's keep this open then. |
This still applies in VS - the editor cannot open the results provided by LSP - it throws with
|
@dibarbet Does VS give us a middleware concept where we can change the request before the LSP client processes it? |
@jasonmalinowski I believe they do - what were you thinking of doing in it? Pointing to a different file on disk? |
If we can act as middleware for a go to definition (or other navigation operation) we can intercept the request and replace the source-generated URI with the one we generate in %TEMP%; from there when the shell opens it we'll then fill out the content as expected. (Even better of course would be if the platform can natively support virtual documents!) |
Something is violating the expectations of the new Uri code:
Found while investigating #69732 and there is a link to a repro solution in there, but essentially execute a Go to Def via LSP to a source generated document.
/cc @tmat @jasonmalinowski
The text was updated successfully, but these errors were encountered: