Function: eglot-execute
eglot-execute is a byte-compiled function defined in eglot.el.gz.
Signature
(eglot-execute SERVER ACTION)
Documentation
Ask SERVER to execute ACTION.
ACTION is an LSP CodeAction, Command or ExecuteCommandParams
object.
Implementations
(eglot-execute SERVER ACTION) in `eglot.el'.
Default implementation.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(cl-defgeneric eglot-execute (server action)
"Ask SERVER to execute ACTION.
ACTION is an LSP `CodeAction', `Command' or `ExecuteCommandParams'
object."
(:method
(server action) "Default implementation."
(eglot--dcase action
(((Command))
;; Convert to ExecuteCommandParams and recurse (bug#71642)
(cl-remf action :title)
(eglot-execute server action))
(((ExecuteCommandParams))
(eglot--request server :workspace/executeCommand action))
(((CodeAction) edit command data)
(if (and (null edit) (null command) data
(eglot-server-capable :codeActionProvider :resolveProvider))
(eglot-execute server (eglot--request server :codeAction/resolve action))
(when edit (eglot--apply-workspace-edit edit this-command))
(when command
;; Recursive call with what must be a Command object (bug#71642)
(eglot-execute server command)))))))