diff options
author | João Távora <joaotavora@gmail.com> | 2025-02-16 18:27:48 +0000 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2025-02-24 23:38:15 +0000 |
commit | e4c911adeaa679a92fab58b196b27c502aaed2f3 (patch) | |
tree | 34714f0b29c309f3efb8d3b699c0ff5da25d7f19 /lisp/emacs-lisp | |
parent | 0ac0f355e50639fb2cdacb6cbfca696d5592a89e (diff) | |
download | emacs-e4c911adeaa679a92fab58b196b27c502aaed2f3.tar.gz emacs-e4c911adeaa679a92fab58b196b27c502aaed2f3.tar.bz2 emacs-e4c911adeaa679a92fab58b196b27c502aaed2f3.zip |
Eglot: use eglot-advertise-cancellation in more situations
The async requests frequently issued by ElDoc are a significant
source of request pile-up on the server side (for some servers).
With this change, Eglot will issue additional LSP
$/cancelRequest notifications for in-flight requests of certain
kinds in the pre-command hook.
This required a small change to the 'jsonrpc-async-request'
entrypoint.
This feature is experimental.
* lisp/jsonrpc.el (jsonrpc-async-request): No longer returns nil.
* lisp/progmodes/eglot.el (eglot--inflight-async-requests): New variable.
(eglot--cancel-inflight-async-requests): New function.
(eglot--async-request): New function.
(eglot--pre-command-hook): Call eglot--cancel-inflight-async-requests.
(eglot-signature-eldoc-function, eglot-hover-eldoc-function)
(eglot-highlight-eldoc-function, eglot-code-action-suggestion):
Use eglot--async-request.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions