From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny Freeman Newsgroups: gmane.emacs.help Subject: RE: Parsing JDT:// scheme in Eglot Date: Mon, 14 Nov 2022 18:11:52 -0500 Message-ID: <8735alm8iu.fsf@dfreeman.email> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36861"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: husain@alshehhi.io Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 15 00:53:16 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oujGO-0009HB-Bd for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 15 Nov 2022 00:53:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouirc-00050F-Eh; Mon, 14 Nov 2022 18:27:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouihW-0001B2-Mx for help-gnu-emacs@gnu.org; Mon, 14 Nov 2022 18:17:17 -0500 Original-Received: from out0.migadu.com ([2001:41d0:2:267::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouihK-0002SI-3b for help-gnu-emacs@gnu.org; Mon, 14 Nov 2022 18:17:10 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668467804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=7cU+8rF2s1W+t8XvQuwyrLxetIUSl78VRjHENn0ST4c=; b=K265N9KJzJ9aj/PIAcivdgjwM3Sx3dkkOuo/unzQZfjiZKsi4wJWwmjMUiWHhQ9YWkYUU7 5zNh0p35BvNWGGwhfSK05slMTa5SHjZlbV+q9nIhSu5u8EijjuXVbCGP/cLMDrg67SDPaU F9GlOJkHANOKstdlvpvqxuQ75fKExLw= X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=danny@dfreeman.email; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140948 Archived-At: > 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