Fix Eglot's command generation for code actions

The user command generated by eglot--code-action should always call
eglot-code-actions with a INTERACTIVE set to t.

Reported in https://github.com/joaotavora/eglot/issues/1132.

* lisp/progmodes/eglot.el (eglot--code-action): Pass INTERACTIVE=t to
eglot-code-action call.
This commit is contained in:
João Távora 2023-03-16 10:45:25 +00:00
parent e10144c156
commit 9d3fdf7e0d

View file

@ -3371,7 +3371,7 @@ at point. With prefix argument, prompt for ACTION-KIND."
`(defun ,name (beg &optional end)
,(format "Execute `%s' code actions between BEG and END." kind)
(interactive (eglot--region-bounds))
(eglot-code-actions beg end ,kind)))
(eglot-code-actions beg end ,kind t)))
(eglot--code-action eglot-code-action-organize-imports "source.organizeImports")
(eglot--code-action eglot-code-action-extract "refactor.extract")