-
-
Notifications
You must be signed in to change notification settings - Fork 882
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 option different modes to plugin uri<->path conversion #326
Conversation
emacs-lsp/lsp-java#18 When user looks for Definition/implementation/reference that is not part of the current project source code the JDT server returns URI prefixed with jdt: and then it has separate call which retrieves the source. After this change different modes will be able to register a uri resolver.
Copied from #328: IMO, url handlers can be handled/registered better by a LSP client in the lsp-define-client macros. |
@vibhavp just to make sure we are on the same page, I will create a method for registering uri handlers similar to the notifications/response. Are you ok with this approach? Thanks |
Yeah, sounds good. |
Conflicts: lsp-methods.el
@vibhavp, I have addressed the comments, do you have more concerns? Without this pull request, #328 , and emacs-lsp/lsp-java#22 lsp java is unusable. Thanks |
@@ -36,6 +36,9 @@ | |||
(_ "file://")) | |||
"Prefix for a file-uri.") | |||
|
|||
(defvar-local lsp-buffer-uri nil |
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.
Alternatively, is it possible to use a programmer-provided function for computing the current buffer uri too?
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.
It is possible, I choose this approach since it allows inlining and the original method was inlined.
Looks good for now. We can add a similar API for getting the current buffer URI later. |
* better code for jvm arg tuning * update Co-authored-by: Wenshuai Hou <whou@palantir.com>
emacs-lsp/lsp-java#18
When the user looks for Definition/implementation/reference that is not part of the
current project source code the JDT server returns URI prefixed with jdt: and
then it has a separate call which retrieves the source. After this change, different modes will be able to register a URI resolver.