branch: externals/eglot
commit 11eb25678b2f32a3496bd7efb95b90941c9ae5ea
Author: mkcms <[email protected]>
Commit: João Távora <[email protected]>
Fix #164: CodeAction command can be a Command object (#165)
* eglot.el (eglot-code-actions): Handle case when the :command field
is not a string.
---
eglot.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 4996f5b..bc89cd2 100644
--- a/eglot.el
+++ b/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))))))))