* Parsing JDT:// scheme in Eglot
@ 2022-11-13 20:07 Husain Alshehhi
2022-11-14 19:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: Husain Alshehhi @ 2022-11-13 20:07 UTC (permalink / raw)
To: gnu-emacs-help
Hello,
I have not seen anything related to this issue in this mailing list.
I am using eglot with [JDT] for LSP support. It is working, mostly: it is able to locate definitions and help. It is able to find references as well. The issue is that if the definition is in a dependency, eglot does not show the definition.
After investigating the issue, this appears to be because JDT returns paths on the format `jdt://' which eglot is not able to interpret. Eglot takes them as normal files, opens them, which end up to be an empty file (since it does not correspond to a file in the filesystem.)
This appears to be an issue solved in lsp-java by writing some [special parser] for JDT scheme. nvim-jdtls seems to have done [something similar] (I am not certain of this since I do not use nvim.)
How to enable this support in eglot?
I did see a [discussion on github] about warning about this issue in the log, and it refers to [a commit on emacs] and the bug [58790]. My understanding of LSP protocol details is small to understand what is going on here.
Thanks,
Husain
[JDT] <https://github.com/eclipse/eclipse.jdt.ls>
[special parser] <https://github.com/emacs-lsp/lsp-java/blob/c005c2f8d10d1b39cfd1e1a4ebd572fccaff1588/lsp-java.el#L860>
[something similar] <https://github.com/mfussenegger/nvim-jdtls/blob/7bc572fc357d7dec8d3ca620b53e763776472582/lua/jdtls/setup.lua#L225>
[discussion on github] <https://github.com/joaotavora/eglot/pull/854>
[a commit on emacs] <https://github.com/emacs-mirror/emacs/commit/1a2d603bb3>
[58790] <https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg00055.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Parsing JDT:// scheme in Eglot
2022-11-13 20:07 Husain Alshehhi
@ 2022-11-14 19:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-11-14 19:54 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: Danny Freeman
Husain Alshehhi [2022-11-13 20:07:10] wrote:
> After investigating the issue, this appears to be because JDT returns paths
> on the format `jdt://' which eglot is not able to interpret. Eglot takes
> them as normal files, opens them, which end up to be an empty file (since it
> does not correspond to a file in the filesystem.)
Sounds like something similar to what Jarchive
(http://elpa.gnu.org/packages/jarchive.html) does for other URLs.
Maybe Jarchive`could try and handle that as well?
(I don't think it does right now)
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Parsing JDT:// scheme in Eglot
@ 2022-11-14 23:11 Danny Freeman
2022-11-16 6:18 ` Husain Alshehhi
0 siblings, 1 reply; 4+ messages in thread
From: Danny Freeman @ 2022-11-14 23:11 UTC (permalink / raw)
To: husain; +Cc: help-gnu-emacs
> Hello,
>
> I have not seen anything related to this issue in this mailing list.
>
> I am using eglot with [JDT] for LSP support. It is working, mostly: it is able
> to locate definitions and help. It is able to find references as well. The
> issue is that if the definition is in a dependency, eglot does not show the
> definition.
>
> After investigating the issue, this appears to be because JDT returns paths on
> the format `jdt://' which eglot is not able to interpret. Eglot takes them as
> normal files, opens them, which end up to be an empty file (since it does not
> correspond to a file in the filesystem.)
>
> This appears to be an issue solved in lsp-java by writing some [special parser]
> for JDT scheme. nvim-jdtls seems to have done [something similar] (I am not
> certain of this since I do not use nvim.)
>
> How to enable this support in eglot?
>
> I did see a [discussion on github] about warning about this issue in the log,
> and it refers to [a commit on emacs] and the bug [58790]. My understanding of
> LSP protocol details is small to understand what is going on here.
>
> Thanks,
> Husain
Hey Husain,
I saw your issue over in the JDT LS github repository, where I've been
talking to one of the contributors
(link: https://github.com/eclipse/eclipse.jdt.ls/issues/2322)
I've also opened up a ticket in the eglot-java bug tracker, where I
think might be a good place to implement a solution:
https://github.com/yveszoundi/eglot-java/issues/6
so feel free to follow that discussion.
--
Danny Freeman
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Parsing JDT:// scheme in Eglot
2022-11-14 23:11 Parsing JDT:// scheme in Eglot Danny Freeman
@ 2022-11-16 6:18 ` Husain Alshehhi
0 siblings, 0 replies; 4+ messages in thread
From: Husain Alshehhi @ 2022-11-16 6:18 UTC (permalink / raw)
To: Danny Freeman; +Cc: help-gnu-emacs
Thank you Danny for looking into this issue.
On Mon 14 Nov 2022 at 18:11, "Danny Freeman" <danny@dfreeman.email> wrote:
> I've also opened up a ticket in the eglot-java bug tracker, where I
> think might be a good place to implement a solution:
> https://github.com/yveszoundi/eglot-java/issues/6
> so feel free to follow that discussion.
Do you think that this is the best place to implement a jdt scheme handler vs a separate package altogether? I am not sure how many people use eglot-java for java rather than using eglot directly. I recall installing eglot-java and it failed to load, and I went back to eglot.
In any case, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-16 6:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14 23:11 Parsing JDT:// scheme in Eglot Danny Freeman
2022-11-16 6:18 ` Husain Alshehhi
-- strict thread matches above, loose matches on Subject: below --
2022-11-13 20:07 Husain Alshehhi
2022-11-14 19:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.