-
Notifications
You must be signed in to change notification settings - Fork 417
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: Return custom schema (osmd:/) URIs for go to definition in LSP #2079
LSP: Return custom schema (osmd:/) URIs for go to definition in LSP #2079
Conversation
You can take a look at corresponding emacs LSP client implementation for this feature here (should be fairly readable) |
Thanks a lot, did you test this with decompilation enabled? |
you can can InternalsVisibleTo for |
That sounds a little bit dirty to me.. :) and I wonder if the nicer thing would be to lift the of "external symbol file path" abstraction into a separate class or just mark the method public? But yeah, I can add the |
515f13e
to
f736f97
Compare
I have updated the commit by adding a small note here as a comment w.r.t. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little bit of feedback.
Also a thing of note: I'm looking at creating an extension for the lsp spec to allow for file metadata, to try and standardize the process. Hence the scheme name change to just omnisharp
.
My thinking is that we'll be able to advertise a capability that this language server hosts a given "scheme" (ie omnisharp) and have that wired into editors like vscode automagically. And that provider would be called to get the content instead of the usual location like the disk, etc.
2d7ceb2
to
c3453c2
Compare
Is there something I can do to advance this PR towards a merge? Or is the approach still in limbo for some reason, or maybe because VS Code guys might decide to implement metadata loading over LSP in a different way? |
I have added tests for the |
I have cloned your fork
yet I am still getting this error when I run
Let me know if you need something else or if I could have done anything different! |
@CsBigDataHub you also need to use updated Not sure if you noticed that -- I did not merge lsp-mode PR since this PR on omnisharp-roslyn is still in limbo. |
@razzmatazz Is it possible for you to pull the latest changes from |
8347023
to
856fbfa
Compare
This enables us to implement to parse the URI and invoke 'o#/metadata' in LSP client to retrieve metadata source. Also use "omnisharp:/metadata/" URI scheme to make it more obvious where the data comes from as per code review.
856fbfa
to
57cab09
Compare
I have tested this PR and can confirm that it works well with emacs This is a handy feature and would like to see it merged. Thanks for maintaining @razzmatazz Thanks for this feature. |
* Go to base class definition; * Go to definition in metatada.
57cab09
to
34ddbaa
Compare
Any progress on this? I was hoping this can be merged so we can start seeing metadata in Emacs! Friendly ping, @david-driscoll @filipw |
Can we have some update on this PR, please? It would be great to see this merged 🙂 |
Hey. I am cancelling this, as lsp-csharp.el in emacs-lsp will introduce support for this using an alternative lsp server:
Other people can resubmit the content of this PR and tune it to their needs but I don't want to wait another year... |
This enables us to implement to parse the URI and to invoke
o#/metadata
in LSP client to retrieve metadata source.
I think we might need to expose a capability for this via LSP mechanism in order
not to break anything for clients that know nothing about
osmd:/
URIs but I amnot sure how to do that. Maybe @david-driscoll can chime in?
Also I am not 100% sure about
osmd:/
URI schema, maybe the path should be formed differently?Also
Helpers.cs:FromUri(DocumentUri uri)
has custom code that builds "metadata filename" as doesSymbolExtensions.cs:GetFilePathForExternalSymbol
but that code is internal.https://github.com/OmniSharp/omnisharp-roslyn/blob/master/src/OmniSharp.Roslyn/Extensions/SymbolExtensions.cs#L293-L297