]> git.eshelyaron.com Git - emacs.git/commit
Offer shortcut commands to commonly invoked code actions
authorAndrii Kolomoiets <andreyk.mad@gmail.com>
Thu, 28 Jan 2021 18:36:11 +0000 (20:36 +0200)
committerGitHub <noreply@github.com>
Thu, 28 Jan 2021 18:36:11 +0000 (18:36 +0000)
commit49327fb04c173249346edb30ac9a8a7cd8aade53
treef67db3cdabc01da67fb09a2b64dc0a5265fc6a07
parentae361b0a49d0db70aedfa481070d88752fe62f35
Offer shortcut commands to commonly invoked code actions

See also https://github.com/joaotavora/eglot/issues/598.

Make eglot-code-actions accept a new action-kind argument.  If there
is only one action of that kind, apply it.  This allows us to create
actions shortcuts like eglot-code-action-organize-imports, etc.

* eglot.el (eglot-code-actions): Accept new argument action-kind.
(eglot--code-action): New function-defining helper macro.
(eglot-code-action-organize-imports)
(eglot-code-action-extract)
(eglot-code-action-inline)
(eglot-code-action-rewrite)
(eglot-code-action-quickfix): New commands.

* README.md: Mention new feature.

* NEWS.md: Mention new feature.

Co-authored-by: João Távora <joaotavora@gmail.com>
GitHub-reference: close https://github.com/joaotavora/eglot/issues/411
lisp/progmodes/eglot.el