]> git.eshelyaron.com Git - emacs.git/commitdiff
Codeaction command can be a command object ()
authorMichal Krzywkowski <k.michal@zoho.com>
Fri, 23 Nov 2018 18:00:00 +0000 (19:00 +0100)
committerJoão Távora <joaotavora@gmail.com>
Fri, 23 Nov 2018 18:00:00 +0000 (18:00 +0000)
* 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

index 4996f5b639aa75c8d4d19d61e6ccc674b73f6b92..bc89cd28f3718b1a7884c50eaa745feff31be150 100644 (file)
@@ -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))))))))
 
 
 \f