GNU bug report logs -
#61506
30.0.50; [PATCH]: Send command in eglot completion exit-function
Previous Next
Full log
View this message in rfc822 format
João Távora <joaotavora <at> gmail.com> writes:
> On Sat, Feb 18, 2023 at 10:20 PM Theodor Thornhill <theo <at> thornhill.no> wrote:
>
> Ping :-)
>
> Presuming you meant to ping me, I'm not sure I can provide much more input
> at the moment. As I wrote, if someone is familiar with this part of the standard
> I'll be happy to review a patch adding this to Eglot.
>
> I share with Felician a concern: if the notification can be sent from the exit-function
> it's one thing, and the patch is possibly a one or two-liner. If, OTOH, the notification
> has to be sent after the didChange that follows a completion choice, then it's
> probably a much more complicated change.
>
Yeah, the patch add this only to the exit-function, which also sends a
didChange. No need to add this to anything else than the exit-function,
I believe. Not sure whether you looked at the patch, but here it is
inlined:
```
Send command in eglot completion exit-function
* lisp/progmodes/eglot.el: Destructure optional argument command.
(eglot-completion-at-point): Send command if supplied by server.
1 file changed, 4 insertions(+), 1 deletion(-)
lisp/progmodes/eglot.el | 5 ++++-
modified lisp/progmodes/eglot.el
@@ -2925,7 +2925,7 @@ eglot-completion-at-point
(window-buffer (minibuffer-selected-window))
(current-buffer))
(eglot--dbind ((CompletionItem) insertTextFormat
- insertText textEdit additionalTextEdits label)
+ insertText textEdit additionalTextEdits label command)
(funcall
resolve-maybe
(or (get-text-property 0 'eglot--lsp-item proxy)
@@ -2965,6 +2965,9 @@ eglot-completion-at-point
(when (cl-plusp (length additionalTextEdits))
(eglot--apply-text-edits additionalTextEdits)))
(eglot--signal-textDocument/didChange)
+ (when command
+ (eglot--dbind ((Command) command arguments) command
+ (eglot-execute-command server (intern command) arguments)))
(eldoc)))))))))
(defun eglot--hover-info (contents &optional _range)
```
This bug report was last modified 1 year and 241 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.