]> git.eshelyaron.com Git - emacs.git/commit
Eglot: remove hacky advice of jsonrpc-request
authorJoão Távora <joaotavora@gmail.com>
Wed, 29 Mar 2023 21:48:54 +0000 (22:48 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 2 Apr 2023 22:40:46 +0000 (23:40 +0100)
commita8c1559a663d9bc21776e33303251e244f86f0d7
tree9c7a862affd7d79d2b80bc0e93175d11bbdd045c
parent093a360251afdbdc6fe6cf22e72ccbc79fc22e2e
Eglot: remove hacky advice of jsonrpc-request

The vast majority of Eglot sync requests to the server need to inform
the server of any pending changes to the buffer beforehand, so that
the server has up-to-date information to do its job.

But doing so at the expense of ugly advice of jsonrpc-request is ill
advised.  Introduce eglot--request helper instead and use that.

Use this opportunity to conduct a review of Eglot sync requests and
come to the conclusion that all need to send any changes beforehand.
Nevertheless, an IMMEDIATE kwarg to eglot--request was added to
bypassing this.

* lisp/progmodes/eglot.el
(eglot--request): New helper.
(eglot-shutdown)
(eglot-execute-command)
(eglot-workspace-configuration)
(eglot--signal-textDocument/willSave)
(eglot--workspace-symbols)
(eglot--lsp-xrefs-for-method)
(xref-backend-apropos)
(eglot-format)
(eglot-completion-at-point)
(eglot-imenu)
(eglot-rename)
(eglot-code-actions): Use eglot--request.
lisp/progmodes/eglot.el