all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59465: Eglot does not advertise resolveSupport capabilities
@ 2022-11-21 21:04 Marcin Pajkowski
  2022-11-22 20:24 ` Marcin Pajkowski
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Pajkowski @ 2022-11-21 21:04 UTC (permalink / raw)
  To: 59465


[-- Attachment #1.1: Type: text/plain, Size: 361 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 423 bytes --]

[-- Attachment #2: Eglot-Advertise-completion.resolveSupport-capabilities.patch --]
[-- Type: text/x-patch, Size: 1450 bytes --]

From b290face2792b254ad9567d007205e715da48283 Mon Sep 17 00:00:00 2001
From: Marcin Pajkowski <marcin.pajkowski@gmail.com>
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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#59465: Eglot does not advertise resolveSupport capabilities
  2022-11-21 21:04 bug#59465: Eglot does not advertise resolveSupport capabilities Marcin Pajkowski
@ 2022-11-22 20:24 ` Marcin Pajkowski
  2022-11-24 11:52   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Pajkowski @ 2022-11-22 20:24 UTC (permalink / raw)
  To: 59465


[-- Attachment #1.1: Type: text/plain, Size: 560 bytes --]

Hi,

I added bug reference number to the commit message.

Marcin

pon., 21 lis 2022 o 22:04 Marcin Pajkowski <marcin.pajkowski@gmail.com>
napisał(a):

> 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
>

[-- Attachment #1.2: Type: text/html, Size: 925 bytes --]

[-- Attachment #2: Eglot-Advertise-completion.resolveSupport-capabilities.patch --]
[-- Type: text/x-patch, Size: 1465 bytes --]

From b290face2792b254ad9567d007205e715da48283 Mon Sep 17 00:00:00 2001
From: Marcin Pajkowski <marcin.pajkowski@gmail.com>
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.  (bug#59465)
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#59465: Eglot does not advertise resolveSupport capabilities
  2022-11-22 20:24 ` Marcin Pajkowski
@ 2022-11-24 11:52   ` Eli Zaretskii
  2022-11-24 12:47     ` João Távora
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-11-24 11:52 UTC (permalink / raw)
  To: Marcin Pajkowski, João Távora; +Cc: 59465

> From: Marcin Pajkowski <marcin.pajkowski@gmail.com>
> Date: Tue, 22 Nov 2022 21:24:39 +0100
> 
> I added bug reference number to the commit message.

João, should I install this?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59465: Eglot does not advertise resolveSupport capabilities
  2022-11-24 11:52   ` Eli Zaretskii
@ 2022-11-24 12:47     ` João Távora
  2022-11-24 14:18       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: João Távora @ 2022-11-24 12:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Marcin Pajkowski, 59465

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

Yes, please, and thank you in advance.

On Thu, Nov 24, 2022, 11:52 Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Marcin Pajkowski <marcin.pajkowski@gmail.com>
> > Date: Tue, 22 Nov 2022 21:24:39 +0100
> >
> > I added bug reference number to the commit message.
>
> João, should I install this?
>

[-- Attachment #2: Type: text/html, Size: 670 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59465: Eglot does not advertise resolveSupport capabilities
  2022-11-24 12:47     ` João Távora
@ 2022-11-24 14:18       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-11-24 14:18 UTC (permalink / raw)
  To: João Távora; +Cc: marcin.pajkowski, 59465-done

> From: João Távora <joaotavora@gmail.com>
> Date: Thu, 24 Nov 2022 12:47:02 +0000
> Cc: Marcin Pajkowski <marcin.pajkowski@gmail.com>, 59465@debbugs.gnu.org
> 
> Yes, please, and thank you in advance.

Done, and closing the bug.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-24 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 21:04 bug#59465: Eglot does not advertise resolveSupport capabilities Marcin Pajkowski
2022-11-22 20:24 ` Marcin Pajkowski
2022-11-24 11:52   ` Eli Zaretskii
2022-11-24 12:47     ` João Távora
2022-11-24 14:18       ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.