unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Husain Alshehhi <husain@alshehhi.io>
To: gnu-emacs-help@gnu.org
Subject: Parsing JDT:// scheme in Eglot
Date: Sun, 13 Nov 2022 20:07:10 +0000	[thread overview]
Message-ID: <87mt8u39g4.fsf@alshehhi.io> (raw)

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>




             reply	other threads:[~2022-11-13 20:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13 20:07 Husain Alshehhi [this message]
2022-11-14 19:54 ` Parsing JDT:// scheme in Eglot Stefan Monnier via Users list for the GNU Emacs text editor
  -- strict thread matches above, loose matches on Subject: below --
2022-11-14 23:11 Danny Freeman
2022-11-16  6:18 ` Husain Alshehhi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mt8u39g4.fsf@alshehhi.io \
    --to=husain@alshehhi.io \
    --cc=gnu-emacs-help@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).