-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Go to definition of partial class involved with source generators errors #178
Comments
Hey @lem102 (1) I think this is what you are looking after: https://learn.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.documentinfo.isgenerated?view=roslyn-dotnet-4.7.0 (2) Most likely you need to figure the schema yourself and implement this. Note that there is a similar code where URIs are generated for source-code-from-metadata, so that may be helpful to you: Please do not hesitate to ask! Also, -- this server is a bit of a hack -- feel free to improvise :) |
can confirm this also happens with windows 11, neovim v0.10.0 in a godot project for goto definition, implementations, references, etc i've tried to fix this for a few days, but with no F# experience and poor lsp knowledge I didn't have any results for anyone else trying this, it seems vscode-csharp faced the same issue (and possibly partially fixed?) |
I also suffer from this |
#189 looks very much related to this issue, has been merged and should fix part of the problem–it does not show refs to generated code but does not break find-references at very least. |
The issue should be fixed with #190 -- find references will actually find references in .cshtml files and the like (provided code generators use #file pragmas properly) |
This should have been fixed with 0.16.0: Please reopen if not |
OS: Windows 10
Editor: emacs 29.3
LSP Client: eglot 1.17
When I try go to definition of one of the partial classes in my godot project, csharp-ls throws an exception:
After adding some logging, I can see that this is because the locations from the Roslyn symbol refer to the class I have created, and the partial filepaths of Godot's source generated classes. The latter aren't valid URIs, so the above exception is thrown.
A similar error occurs on find references.
I'd like to submit a PR to sort this, but am currently at a loss on how to:
Any pointers would be helpful 🙂
The text was updated successfully, but these errors were encountered: