Skip to content
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

Merged
merged 4 commits into from
Apr 16, 2018

Conversation

yyoncho
Copy link
Member

@yyoncho yyoncho commented Mar 31, 2018

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.

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.
@vibhavp
Copy link
Member

vibhavp commented Apr 4, 2018

Copied from #328:

IMO, url handlers can be handled/registered better by a LSP client in the lsp-define-client macros.

@yyoncho
Copy link
Member Author

yyoncho commented Apr 4, 2018

@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

@vibhavp
Copy link
Member

vibhavp commented Apr 5, 2018

Yeah, sounds good.

@yyoncho
Copy link
Member Author

yyoncho commented Apr 15, 2018

@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
Copy link
Member

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?

Copy link
Member Author

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.

@vibhavp
Copy link
Member

vibhavp commented Apr 16, 2018

Looks good for now. We can add a similar API for getting the current buffer URI later.

@vibhavp vibhavp merged commit 34a669b into emacs-lsp:master Apr 16, 2018
@yyoncho yyoncho deleted the dynamic-references branch July 8, 2020 20:05
wkirschbaum pushed a commit to wkirschbaum/lsp-mode that referenced this pull request Jun 1, 2021
renatofdds pushed a commit to renatofdds/lsp-mode that referenced this pull request May 13, 2023
* better code for jvm arg tuning

* update

Co-authored-by: Wenshuai Hou <whou@palantir.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants