From 1e7f94d75a30628be56ad00de8c6245f5f3e9fdf Mon Sep 17 00:00:00 2001 From: Michal Krzywkowski Date: Fri, 23 Nov 2018 19:00:00 +0100 Subject: [PATCH] Codeaction command can be a command object () * eglot.el (eglot-code-actions): Handle case when the :command field is not a string. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/164 GitHub-reference: fix https://github.com/joaotavora/eglot/issues/165 --- lisp/progmodes/eglot.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4996f5b639a..bc89cd28f37 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2011,7 +2011,12 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp." (when edit (eglot--apply-workspace-edit edit)) (when command - (eglot-execute-command server (intern command) arguments))))) + (cond ((stringp command) + (eglot-execute-command server (intern command) arguments)) + ((listp command) + (eglot-execute-command server + (intern (plist-get command :command)) + (plist-get command :arguments)))))))) -- 2.39.2