[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Parsing JDT:// scheme in Eglot
From: |
Husain Alshehhi |
Subject: |
Parsing JDT:// scheme in Eglot |
Date: |
Sun, 13 Nov 2022 20:07:10 +0000 |
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>
- Parsing JDT:// scheme in Eglot,
Husain Alshehhi <=