]> git.eshelyaron.com Git - emacs.git/commit
Eglot: introduce eglot-advertise-cancellation
authorJoão Távora <joaotavora@gmail.com>
Tue, 14 Jan 2025 15:58:57 +0000 (15:58 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:10:20 +0000 (19:10 +0100)
commitb87bc1152138a7ce798d484b37ebcae17da34a24
tree01d7529af8fd44004a861a207265b89dca43a69a
parent2eb0909cefcf201019aa88c402b9e47e8b4a060c
Eglot: introduce eglot-advertise-cancellation

Setting this variable to true causes Eglot to send special
cancellation notification for certain stale client request.

This may help some LSP servers avoid doing costly but ultimately useless
work on behalf of the client, improving overall performance.

Request cancellation is described in

   https://microsoft.github.io/language-server-protocol/
      specifications/lsp/3.17/specification/#cancelRequest

* lisp/jsonrpc.el (jsonrpc-request): Accept function as value for
CANCEL-ON-INPUT.

* lisp/progmodes/eglot.el (eglot--request): Rework.

* doc/misc/eglot.texi (Customizing Eglot): Mention
eglot-advertise-cancellation.

(cherry picked from commit 7f0ef9655cdc28c3b8055e32c9e84ea57339b139)
doc/misc/eglot.texi
etc/EGLOT-NEWS
lisp/jsonrpc.el
lisp/progmodes/eglot.el