Subject: bug#59465: closed (Re: bug#59465: Eglot does not advertise resolveSupport capabilities)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 24 Nov 2022 14:18:02 +0000

Your bug report

#59465: Eglot does not advertise resolveSupport capabilities

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59465: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59465
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59465: Eglot does not advertise resolveSupport capabilities
From: Eli Zaretskii <[email-masked]>
To: João Távora <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 24 Nov 2022 16:18:03 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: João Távora <[email-masked]>
> Date: Thu, 24 Nov 2022 12:47:02 +0000
> Cc: Marcin Pajkowski <[email-masked]>, [email-masked]
> 
> Yes, please, and thank you in advance.

Done, and closing the bug.

Subject: Eglot does not advertise resolveSupport capabilities
From: Marcin Pajkowski <[email-masked]>
To: [email-masked]
Date: Mon, 21 Nov 2022 22:04:27 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Emacs developers,

I recently found that Eglot does not receive
completions with additional text edits from servers
that expect such capability to be advertised by client.

This advertisement is required by rust-analyzer server
to provide completions for symbols that are not resolved
but can be automatically imported.

This patch fixes this issue.

Marcin
From b290face2792b254ad9567d007205e715da48283 Mon Sep 17 00:00:00 2001
From: Marcin Pajkowski <[email-masked]>
Date: Sun, 20 Nov 2022 20:03:57 +0100
Subject: [PATCH] Eglot: Advertise completion.resolveSupport capabilities

Some servers avoid reporting completion items that require
"additionalTextEdits" capability. Actually eglot-completion-at-point
function supports such feature so it can be advertised to LSP server.

* lisp/progmodes/eglot.el
  (eglot-client-capabilities): Advertise resolveSupport
---
 lisp/progmodes/eglot.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index bbd902c1c7..fab3b1cac0 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -737,7 +737,10 @@ eglot-client-capabilities
                                            t
                                          :json-false)
                                       :deprecatedSupport t
+                                      :resolveSupport (:properties
+                                                       ["documentation"
+                                                        "details"
+                                                        "additionalTextEdits"])
                                       :tagSupport (:valueSet [1]))
                                     :contextSupport t)
              :hover              (list :dynamicRegistration :json-false
--
2.38.1