From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 08 14:10:05 2023 Received: (at submit) by debbugs.gnu.org; 8 Feb 2023 19:10:05 +0000 Received: from localhost ([127.0.0.1]:56693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPppV-0000uB-3A for submit@debbugs.gnu.org; Wed, 08 Feb 2023 14:10:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:49598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPppS-0000tw-HD for submit@debbugs.gnu.org; Wed, 08 Feb 2023 14:10:04 -0500 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 1pPppS-0007UW-8V for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 14:10:02 -0500 Received: from out-121.mta1.migadu.com ([95.215.58.121]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPppP-0002nI-JB for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 14:10:01 -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=thornhill.no; s=key1; t=1675883383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=nLsXmOtUk+8FAFHKEWvP+iDILzw/rDytyJzK3f8aaWE=; b=1x+WO136Xl7e3zltcUYQ+XxgPnU9+h/JoK9ceKluDZosmTcOA6S5389Sz12WbEI1tk+OOI y4jYwkLa5WCKRyDReFKiZeC/bE3nIQ5ZUAr/nCFqdY4eiw17sGI/lrULCd5fmXiBP0TqGu SYdhxxC/RzXyDJCE7K/toduM42vtM16y76xlp1ai9hwL/VVE0mn4PxFxRw4rVxk8Z+x7uy Oj+udhFWdR0KWDmG6p9W2bDFh4xiMYTzFrQ6+07Jr5LJVx6zSjI9UEuXoepN0eU6bDwo4q jxqg/Twg4LTyXpSjJWwfF8OEneeXx7CHhKyQKJZXtMVYL1CqWCWUK0wJGcWFDg== From: Theodor Thornhill To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Adding support for jdt:// file scheme in eglot X-Debbugs-Cc: joaotavora@gmail.com Date: Wed, 08 Feb 2023 20:09:40 +0100 Message-ID: <87r0v06kjv.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.121; envelope-from=theo@thornhill.no; helo=out-121.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi! When using Eglot along with Java there are some hacks that needs to be made to make things functional. One of the more important things is to add support for the jdt:// file scheme that is sent when you try to go-to-definition on a system or third party lib. For completeness sake - consider: ``` import java.util.Li|st; public Foo { void foo() { List foo; } } ``` Cursor is now where | is, and if you try to M-., you won't get far. This is because jdtls uses a convoluted way to retrieve this information on demand, see [0]. Now the client has to query the language server an additional time to get the actual content, load it somewhere, _then_ goto-def. I've created one such hack for my own config, but maybe this is something that could be mainlined, even though eglot itself is trying hard to be language agnostic? I'm not sure the code needs to live in eglot, it could live some place other file-handlers live, if such a place exists. Anyway, the code I use to fix this now looks like this: ``` (defclass eglot-java (eglot-lsp-server) () :documentation "A custom class for Java") (cl-defmethod eglot-execute-command ((_server eglot-java) (_cmd (eql java.apply.workspaceEdit)) arguments) "Eclipse JDT breaks spec and replies with edits as arguments." (mapc #'eglot--apply-workspace-edit arguments)) (cl-defmethod eglot-initialization-options ((server eglot-java)) "Passes through required java initialization options" `( :settings ,eglot-java-config :workspaceFolders [,(eglot--path-to-uri (project-root (project-current)))] :extendedClientCapabilities (:classFileContentsSupport t))) (defun jdt-file-name-handler (operation &rest args) "Support Eclipse jdtls `jdt://' uri scheme." (let* ((uri (car args)) (cache-dir "/tmp/.eglot") (source-file (expand-file-name (file-name-concat cache-dir (save-match-data (when (string-match "jdt://contents/\\(.*?\\)/\\(.*\\)\.class\\?" uri) (format "%s.java" (replace-regexp-in-string "/" "." (match-string 2 uri) t t)))))))) (unless (file-readable-p source-file) (let ((content (jsonrpc-request (eglot-current-server) :java/classFileContents (list :uri uri))) (metadata-file (format "%s.%s.metadata" (file-name-directory source-file) (file-name-base source-file)))) (unless (file-directory-p cache-dir) (make-directory cache-dir t)) (with-temp-file source-file (insert content)) (with-temp-file metadata-file (insert uri)))) source-file)) (add-to-list 'eglot-server-programs `(java-mode . (eglot-java . ("jdtls")))) (add-to-list 'eglot-server-programs `(java-ts-mode . (eglot-java . ("jdtls")))) ``` As you can see, we need to query the server with :java/classFileContents, and also register with the server to send it with the :extendedClientCapabilities on initialization. Is there a place this code could live? Maybe in the new java-ts-mode? Theo [0]: https://github.com/eclipse/eclipse.jdt.ls/issues/2322#issuecomment-1313953316 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 04:47:37 2023 Received: (at submit) by debbugs.gnu.org; 9 Feb 2023 09:47:37 +0000 Received: from localhost ([127.0.0.1]:57553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ3Wi-0001qG-QB for submit@debbugs.gnu.org; Thu, 09 Feb 2023 04:47:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:50506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ3Wi-0001q4-1R for submit@debbugs.gnu.org; Thu, 09 Feb 2023 04:47:36 -0500 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 1pQ3Wh-0003jc-QL for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 04:47:35 -0500 Received: from mout.gmx.net ([212.227.17.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ3Wf-0000uZ-J3 for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 04:47:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1675936040; bh=I+2wbmBlcTVvs6ge40SUTb7US5g0P+t8MgyxYxAhTTM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=IvslTP2MYEcTfkVpcKLrBaLZYQxVmFBq1FlDF3Z1gYwulxtpEmyc9lbH6SnApNSfa 2PrF3Oz4KDl/t4g+PeKhGAKIkFJrUXst0n8n3i5QiSWivtrmeiavOrjX5Qe7o2ZPgP z2p39tF0AITmlApB1DBuknh6NPSMNtaQb4SDCssvaAj88A12+AjZsypikQcrmCXOiU ofIZuP9WPiH2GV/iYkC+xbu61sTZml4yBpNd9X2hbGHMMO/GkxDa8V/G+phP1u489Y OhCROrA+wgEom4AJ4ogzn/yiS6LT8owA5gBP9Ff4cTUOW9M4BWhzKMeT0Tql8kEZIP 9V5YVnuyhgxCg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.22]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXXyJ-1p5ylT0yVD-00Yx2T; Thu, 09 Feb 2023 10:47:20 +0100 From: Michael Albinus To: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot In-Reply-To: <87r0v06kjv.fsf@thornhill.no> (Theodor Thornhill via's message of "Wed, 08 Feb 2023 20:09:40 +0100") References: <87r0v06kjv.fsf@thornhill.no> Date: Thu, 09 Feb 2023 10:47:17 +0100 Message-ID: <875ycbkw62.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:djkcSaPxnRdYI0T2o+eUVbomzyWHBid2Cf7zlZ2bsULtxK4nE83 YnPiMu1u6uasU8QGDI2a5Ho51TSD0EGqi5ILzE2pNH+k1hMcFIl6+WWwFcJo81/qEcm61zQ 59XujYIomogXoT2kvChp/j6D6MxvSYykXcdFGFnemOlc/1Ll2mQT++FBMTsT1zABAI77kJf 6D/HdNuVGGjVEsdW7Zo4w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:CmgB/3I7sT0=;ho9m+n70Gb/h2SZj+8TZPxI1FJl y31stILxGBROZ9XSLuluPoitJHEKWkWt9Oem2pmw1Ruf9tbIDMVs2HJjg5yp4IL8Dna22/jl8 YCGCFQxVq+ZMYnoy3jq07obM7AqOKR82QPywt4CvC4j6r5+KPb3AbVfyL16QiHIPieOvsftuk jzgmMItFbOm9Sbh1rMSh911IU9wZkWybXQuLSnwC/PeKLxk//O1KcwcL1kANZ2TEVR+Vp2ZI8 XBQxRYE6Kvm2MXoVxGhOZsvu3OVSDFdA+4d6p9AaMggVzobdXqktpteHd414O3VpVso7tKpqf 9BHCtazU7iPh2izJ0gOQ1uq0x1S5HNWqHyEjmc7Xa8UicOdZqYgk9k+n+NPMTJdFN05MgY/C2 Rcf14NoWEggyYpainyCoEk11QK+2Jymp5KqsjOfQUhOQPVhgEGINu9twr3wRXHlqb1ks60X90 19P86ekFkUJmPdJW4xXz3SA0vp5246HmrNCsuwVeF9sIdzT+RF1wKSuY5fFGMgnedj2+lMmVT iDo7PkgMm3YcJ9SqRvrR70aquwVBmTgie0vhTYxlWN12R5VWSMvuNEz2CHB3qmAsdCh++Sjht z+PE4y6E86+RlKmK6ZrpCUtvRLPTEJyTuekr6b55mBi8MQcyf0gAGZIvl9Mp2wHYqT4+zE3Zf xW2U0mVDLhQAwALV/Ll69MIMxwtLrabIccH90QqSvVlmo9hH3R67fDq67QYGYG7VWKR8xO3ky txK45VGQaE4K7wLpwiIuUhvKy6eXKqHZKveG6BP0ohXj+2QlGrOtowWgVP/Y63OsqXpMvrMj0 dY844MtqNEwG/cpz+BKyc81TF3pN79pYpp958iG/d4ZJKtnAtOryQ2X4jecbp/ZgXV5bHgqkF fFg7PFNuAZREvxtX3EnOzC9BB2boFLurEUiSqzCbZ1fpPe3JC68GPnMk1R2xp/QA7KcfmA0Y2 H78T8MEM8eF71ZY5lyjgrdcx1hk= Received-SPF: pass client-ip=212.227.17.21; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Theodor Thornhill , 61371@debbugs.gnu.org, Danny Freeman , joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Hi! Hi Theo, > When using Eglot along with Java there are some hacks that needs to be > made to make things functional. One of the more important things is to > add support for the jdt:// file scheme that is sent when you try to > go-to-definition on a system or third party lib. > > As you can see, we need to query the server with > :java/classFileContents, and also register with the server to send it > with the :extendedClientCapabilities on initialization. > > Is there a place this code could live? Maybe in the new java-ts-mode? There is the jarchive package on GNU ELPA. Could this be used, perhaps extended? > Theo Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 05:42:47 2023 Received: (at submit) by debbugs.gnu.org; 9 Feb 2023 10:42:47 +0000 Received: from localhost ([127.0.0.1]:57648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ4O7-0003GQ-3l for submit@debbugs.gnu.org; Thu, 09 Feb 2023 05:42:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:33898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ4O5-0003GJ-Gr for submit@debbugs.gnu.org; Thu, 09 Feb 2023 05:42:45 -0500 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 1pQ4O4-0005m5-St for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:42:44 -0500 Received: from out-172.mta0.migadu.com ([91.218.175.172]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ4O2-0002Ra-KU for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:42:44 -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=thornhill.no; s=key1; t=1675939359; 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: in-reply-to:in-reply-to:references:references; bh=cMJ8axnfKE5AyS68rJqDaTvnX0yu4FcoYAz2yA2s2Us=; b=ulSWlpNwhYi/naNY5WlnDKafBGeqZkch4B8zC3vsS2c7TJM+Nhvdwdo5xPmJ74hovIvY1h kumHlnO0yP8THNfAotCeppX1OMu9TWuf/I9U+FyTV2UZKTEH1k7UhXGhALZa9NObaha88Z hSmvS2+zWlE8LTSwJU58u+Ive2xN+Px9DS22aWHOOSyGvmghi/Fpiz/5Ri88HXLHxc1Vxj qY7LHfTTd4yUQPynD2jARH3barxZoD/KQRS3ve9LAtTHC0QMgJV/jYR0OPtMaVxtqLcAfa XCuw/BNtDEKmB35SVWjOcoch0t0OtWhrxlqsK8CeqxuOQmbDCXVOvK+2PiX5DA== From: Theodor Thornhill To: Michael Albinus , "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot In-Reply-To: <875ycbkw62.fsf@gmx.de> References: <87r0v06kjv.fsf@thornhill.no> <875ycbkw62.fsf@gmx.de> Date: Thu, 09 Feb 2023 11:42:37 +0100 Message-ID: <87v8kb9l2a.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.172; envelope-from=theo@thornhill.no; helo=out-172.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 61371@debbugs.gnu.org, Danny Freeman , joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Michael Albinus writes: > Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife > of text editors" writes: > >> Hi! > > Hi Theo, > >> When using Eglot along with Java there are some hacks that needs to be >> made to make things functional. One of the more important things is to >> add support for the jdt:// file scheme that is sent when you try to >> go-to-definition on a system or third party lib. >> >> As you can see, we need to query the server with >> :java/classFileContents, and also register with the server to send it >> with the :extendedClientCapabilities on initialization. >> >> Is there a place this code could live? Maybe in the new java-ts-mode? > > There is the jarchive package on GNU ELPA. Could this be used, perhaps extended? > >> Theo > > Best regards, Michael. Maybe! Don't know what it does, but I'll check it out - thanks! Theo From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 10 15:37:48 2023 Received: (at submit) by debbugs.gnu.org; 10 Feb 2023 20:37:48 +0000 Received: from localhost ([127.0.0.1]:38205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQa9U-0007MH-De for submit@debbugs.gnu.org; Fri, 10 Feb 2023 15:37:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:60100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQa9R-0007M9-S1 for submit@debbugs.gnu.org; Fri, 10 Feb 2023 15:37:46 -0500 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 1pQa9R-0005eK-J4 for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:37:45 -0500 Received: from out-96.mta1.migadu.com ([95.215.58.96]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQa9O-00041o-Vu for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:37:45 -0500 References: <87r0v06kjv.fsf@thornhill.no> <875ycbkw62.fsf@gmx.de> <87v8kb9l2a.fsf@thornhill.no> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1676061458; 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: in-reply-to:in-reply-to:references:references; bh=pVwEWbXYOcenyidDlGztsgyoc2bcmKuBNVV7hoT+CfU=; b=AvScXIkSOVE7ZuiD+8BpdL58KZfou7xnNQ7M/eCrKG49B2RHTEwts2JzG3qV+hUbozbzP8 kVEs/hO75DC0Ey2oVLji8N7/l6xp9xXaageijoCkCIurWtNUDaeqBXJSp38NF7w0daQbJm VgbV4C+Li4Q0zGsx05+okkWiBB5frXA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Theodor Thornhill Subject: Re: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot Date: Fri, 10 Feb 2023 15:32:30 -0500 In-reply-to: <87v8kb9l2a.fsf@thornhill.no> Message-ID: <87h6vt8dfb.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.96; envelope-from=danny@dfreeman.email; helo=out-96.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Michael Albinus , 61371@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Theodor Thornhill writes: > Michael Albinus writes: > >> Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife >> of text editors" writes: >> >>> Hi! >> >> Hi Theo, >> >>> When using Eglot along with Java there are some hacks that needs to be >>> made to make things functional. One of the more important things is to >>> add support for the jdt:// file scheme that is sent when you try to >>> go-to-definition on a system or third party lib. >>> >>> As you can see, we need to query the server with >>> :java/classFileContents, and also register with the server to send it >>> with the :extendedClientCapabilities on initialization. >>> >>> Is there a place this code could live? Maybe in the new java-ts-mode? >> >> There is the jarchive package on GNU ELPA. Could this be used, perhaps extended? >> >>> Theo >> >> Best regards, Michael. > > Maybe! Don't know what it does, but I'll check it out - thanks! > > Theo JDT urls are outside the scope of jarchive. I would think of them less as URLs and more as tokens to be decoded by the LSP server that provides them. JDT urls are intended to be sent back to the LSP server using a special extension method. There is an issue open in the eglot-java repo to implement this but I have been too busy to get around to it https://github.com/yveszoundi/eglot-java/issues/6 Someone has responded there with some code similar to jarchive that will parse the JDT urls and try to open them, but I wouldn't consider that a permanent solution. JDT urls are not standardized and subject to change by the JDT LSP maintainers. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 13:06:38 2023 Received: (at submit) by debbugs.gnu.org; 15 Feb 2023 18:06:38 +0000 Received: from localhost ([127.0.0.1]:33893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSMAw-0003lu-3O for submit@debbugs.gnu.org; Wed, 15 Feb 2023 13:06:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:58434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSMAs-0003le-68 for submit@debbugs.gnu.org; Wed, 15 Feb 2023 13:06:36 -0500 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 1pSMAr-0004Td-Bn for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:06:34 -0500 Received: from out-84.mta0.migadu.com ([2001:41d0:1004:224b::54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSMAm-0005LI-N5 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:06:31 -0500 References: <87r0v06kjv.fsf@thornhill.no> <875ycbkw62.fsf@gmx.de> <87v8kb9l2a.fsf@thornhill.no> <87h6vt8dfb.fsf@dfreeman.email> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1676484384; 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: in-reply-to:in-reply-to:references:references; bh=hLMVxl8UrPUQMWPvbMALH3WqTb3/Bl4hY06cYdSRrIg=; b=ph4cYno105yZQDEHg7I5mI+oTymOjhiyQm/wcOnTHxBNOn1ZjPwH81mTKfhkS4p9YFELbO VyEwn2DI0g5T1RP4/pctIsTbt4ctloksplh55bcLNg7Uj7PMmdDrTJbHtjBFyMUki3aBII im8R0lFjnkv6czkaT8tG4dcXXZ9Tgg8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Theodor Thornhill Subject: Re: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot Date: Wed, 15 Feb 2023 13:05:30 -0500 In-reply-to: <87h6vt8dfb.fsf@dfreeman.email> Message-ID: <875yc2by79.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::54; envelope-from=danny@dfreeman.email; helo=out-84.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Michael Albinus , 61371@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Danny Freeman writes: > Theodor Thornhill writes: > >> Michael Albinus writes: >> >>> Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife >>> of text editors" writes: >>> >>>> Hi! >>> >>> Hi Theo, >>> >>>> When using Eglot along with Java there are some hacks that needs to be >>>> made to make things functional. One of the more important things is to >>>> add support for the jdt:// file scheme that is sent when you try to >>>> go-to-definition on a system or third party lib. >>>> >>>> As you can see, we need to query the server with >>>> :java/classFileContents, and also register with the server to send it >>>> with the :extendedClientCapabilities on initialization. >>>> >>>> Is there a place this code could live? Maybe in the new java-ts-mode? >>> >>> There is the jarchive package on GNU ELPA. Could this be used, perhaps extended? >>> >>>> Theo >>> >>> Best regards, Michael. >> >> Maybe! Don't know what it does, but I'll check it out - thanks! >> >> Theo > > JDT urls are outside the scope of jarchive. I would think of them less > as URLs and more as tokens to be decoded by the LSP server that provides > them. JDT urls are intended to be sent back to the LSP server using a > special extension method. > > There is an issue open in the eglot-java repo to implement this but I > have been too busy to get around to it > https://github.com/yveszoundi/eglot-java/issues/6 > > Someone has responded there with some code similar to jarchive that will > parse the JDT urls and try to open them, but I wouldn't consider that a > permanent solution. JDT urls are not standardized and subject to change > by the JDT LSP maintainers. I think this bug can be closed now, it was fixed in the eglot-java package. See: https://github.com/yveszoundi/eglot-java/issues/6 Thank you, -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 13:10:09 2023 Received: (at submit) by debbugs.gnu.org; 15 Feb 2023 18:10:09 +0000 Received: from localhost ([127.0.0.1]:33918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSMEK-0003sS-Ks for submit@debbugs.gnu.org; Wed, 15 Feb 2023 13:10:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:57990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSMEF-0003sD-8e for submit@debbugs.gnu.org; Wed, 15 Feb 2023 13:10:04 -0500 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 1pSMEE-00062y-VR for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:10:03 -0500 Received: from out-149.mta0.migadu.com ([2001:41d0:1004:224b::95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSMEC-0000Oo-FS for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:10:02 -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=thornhill.no; s=key1; t=1676484597; 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: in-reply-to:in-reply-to:references:references; bh=Zucvu2lpj+DU2iw5QAcE/AdH47Y20EG5SezCpzM0REU=; b=BlGKvDznB3T47F1mmEqaZWdnB2ZIiFkynoyFO9HysMhXeypGoPhjHkcPHYEsI1wmj0CNgx Zyz1RTfRr7xVQmUWqYUN12wlB4vo9V9DvW/+mqSfAfTFQT09tXlU0c8q7FB2WPu27c3oJn EyH6Abv8L7LDJufBvNJ3Wbl45AqaRN8LK7Vm+YEuIRJGirP5jl+8qiBIRGRZleB6apjVe2 YUfKK7SdPX/EY9/NUTi68EFCUDLdMZ0L5lzg4K5wX6ozllTqXPHKScLp3JihVFKoV/bKOa CB5o4eGtV/pqcmwXIiv/JlH3Qmgg3BChZ5LjtgsYshAdGGCWywSPaenQVOxqhw== From: Theodor Thornhill To: Danny Freeman Subject: Re: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot In-Reply-To: <875yc2by79.fsf@dfreeman.email> References: <87r0v06kjv.fsf@thornhill.no> <875ycbkw62.fsf@gmx.de> <87v8kb9l2a.fsf@thornhill.no> <87h6vt8dfb.fsf@dfreeman.email> <875yc2by79.fsf@dfreeman.email> Date: Wed, 15 Feb 2023 19:09:56 +0100 Message-ID: <87leky7qbv.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::95; envelope-from=theo@thornhill.no; helo=out-149.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Michael Albinus , 61371@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Danny Freeman writes: > Danny Freeman writes: > >> Theodor Thornhill writes: >> >>> Michael Albinus writes: >>> >>>> Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife >>>> of text editors" writes: >>>> >>>>> Hi! >>>> >>>> Hi Theo, >>>> >>>>> When using Eglot along with Java there are some hacks that needs to be >>>>> made to make things functional. One of the more important things is to >>>>> add support for the jdt:// file scheme that is sent when you try to >>>>> go-to-definition on a system or third party lib. >>>>> >>>>> As you can see, we need to query the server with >>>>> :java/classFileContents, and also register with the server to send it >>>>> with the :extendedClientCapabilities on initialization. >>>>> >>>>> Is there a place this code could live? Maybe in the new java-ts-mode? >>>> >>>> There is the jarchive package on GNU ELPA. Could this be used, perhaps extended? >>>> >>>>> Theo >>>> >>>> Best regards, Michael. >>> >>> Maybe! Don't know what it does, but I'll check it out - thanks! >>> >>> Theo >> >> JDT urls are outside the scope of jarchive. I would think of them less >> as URLs and more as tokens to be decoded by the LSP server that provides >> them. JDT urls are intended to be sent back to the LSP server using a >> special extension method. >> >> There is an issue open in the eglot-java repo to implement this but I >> have been too busy to get around to it >> https://github.com/yveszoundi/eglot-java/issues/6 >> >> Someone has responded there with some code similar to jarchive that will >> parse the JDT urls and try to open them, but I wouldn't consider that a >> permanent solution. JDT urls are not standardized and subject to change >> by the JDT LSP maintainers. > > I think this bug can be closed now, it was fixed in the eglot-java > package. See: https://github.com/yveszoundi/eglot-java/issues/6 > > Thank you, > -- > Danny Freeman I agree :-) From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 05 20:05:11 2023 Received: (at 61371-done) by debbugs.gnu.org; 6 Sep 2023 00:05:11 +0000 Received: from localhost ([127.0.0.1]:59983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdg2g-00008s-PT for submit@debbugs.gnu.org; Tue, 05 Sep 2023 20:05:10 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:54552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdg2f-00008C-E4 for 61371-done@debbugs.gnu.org; Tue, 05 Sep 2023 20:05:09 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50078e52537so5234127e87.1 for <61371-done@debbugs.gnu.org>; Tue, 05 Sep 2023 17:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693958702; x=1694563502; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=cQ92w5qf8ZwkuOTTqsffl/jCCgQix+JuTSemJ1npvS4=; b=jmnxXZcBpH0HkKDJA21QSfEBcnzZUWrIndziPsBAnQBsHoxazcyLgypM35p+gApR7C d9+KGAsciPkSkdZblpfmRq7dqqDKJHyCduMa2APKX7rXOFtEOzQ1ERvbyqfSl21JyjNL mjIPXliJ6+JTSrgf6YJUy5ZlJjqpYcYhBa37xXVWOOlA0TRXio+3/7A6LN6WO5iSg+uO BYblakQJM2VmBPTFKz0ytnezpxbDpLtA3JtcBwvRDVMcM0eg2OXk2mYfMTTlHeUGOcVd +rvEvGEcPaH2pMS3dHKLvaFkVMHQE79XkMzhNqGaMVVPbzfKx/CaV6QOhi417f2Jfacw xLlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693958702; x=1694563502; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cQ92w5qf8ZwkuOTTqsffl/jCCgQix+JuTSemJ1npvS4=; b=Yimyqf7HAr+e7psUTPraO6T2iFOFyZhvjfWr45IrALKBA/iVY31sqGv1VCRAyBr32v sQw8Ej0vpePehiHHjgnz9Jf/ETl3D8XAykev76cCXwEMHnKzvMxpOzvnHXzcsBBo4oXs 4vfrpMUzBW/0DuXYOdnvISdWa2o4FcF897K6sXlQdxOGMhO3Qou13mYlQpn0S3SaRTJj 1NSs1dvNlktKzKyB7912mhwaJLOMohMTr3Z9ClvgXz1aIf2O2T7/+xhAxldqGhUBYA3b NffoHxAkKYk88DDrJVESJSLFWSIO1GSKIcJGi1tJzeIy/nSC5Qz6NVSG5SZuANRF+/1k vCtQ== X-Gm-Message-State: AOJu0Yyw1O8Y+aM0Z68VGtqJpKAi2S7e8DV1zsSVpC+3j99Daz1Q2nAs xHCQ4Ouf3w2a+qgUNoEg0djVf+GijX26EJgpZ5g= X-Google-Smtp-Source: AGHT+IFignpOv32SsIMmYIB3p4vdwaIUI4YQY0ZlnDBfMEGSE9JEKQGWOjGcQzbMcUU2q9HUY9sOA5kg5RCg8aPe5+I= X-Received: by 2002:a05:6512:210d:b0:500:c2e0:64dd with SMTP id q13-20020a056512210d00b00500c2e064ddmr821317lfr.50.1693958701706; Tue, 05 Sep 2023 17:05:01 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Sep 2023 17:05:01 -0700 From: Stefan Kangas In-Reply-To: <87leky7qbv.fsf@thornhill.no> (Theodor Thornhill's message of "Wed, 15 Feb 2023 19:09:56 +0100") References: <87r0v06kjv.fsf@thornhill.no> <875ycbkw62.fsf@gmx.de> <87v8kb9l2a.fsf@thornhill.no> <87h6vt8dfb.fsf@dfreeman.email> <875yc2by79.fsf@dfreeman.email> <87leky7qbv.fsf@thornhill.no> MIME-Version: 1.0 Date: Tue, 5 Sep 2023 17:05:01 -0700 Message-ID: Subject: Re: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot To: Theodor Thornhill Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61371-done Cc: michael.albinus@gmx.de, joaotavora@gmail.com, Danny Freeman , 61371-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Theodor Thornhill writes: >> I think this bug can be closed now, it was fixed in the eglot-java >> package. See: https://github.com/yveszoundi/eglot-java/issues/6 >> >> Thank you, >> -- >> Danny Freeman > > I agree :-) Thanks, closed. From unknown Sun Jun 22 11:47:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 04 Oct 2023 11:24:35 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator