From a7756c7f0e1ca9aeca59b496e35000651e0a5252 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Tue, 14 Feb 2023 11:52:57 +0100 Subject: [PATCH] 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. --- lisp/progmodes/eglot.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6caf5894ed..4526f41812 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2923,7 +2923,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) @@ -2963,6 +2963,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) -- 2.34.1