diff options
| author | João Távora | 2025-01-14 15:58:57 +0000 |
|---|---|---|
| committer | João Távora | 2025-01-28 11:04:21 +0000 |
| commit | 7f0ef9655cdc28c3b8055e32c9e84ea57339b139 (patch) | |
| tree | 87aaaeafc6a6dc5670e186d74aac8b76e431a356 /doc | |
| parent | 9e4b626f7eea788966a1ad92d4af76f8b0a2573f (diff) | |
| download | emacs-7f0ef9655cdc28c3b8055e32c9e84ea57339b139.tar.gz emacs-7f0ef9655cdc28c3b8055e32c9e84ea57339b139.zip | |
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.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/eglot.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index df24cf2a1dc..47649455cec 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi | |||
| @@ -919,6 +919,13 @@ Set this variable to non-nil if you'd like progress notifications coming | |||
| 919 | from the language server to be handled by Emacs's progress reporting | 919 | from the language server to be handled by Emacs's progress reporting |
| 920 | facilities. If the value is the symbol @code{messages} the message | 920 | facilities. If the value is the symbol @code{messages} the message |
| 921 | buffer is used, else the progress is reported in the mode line. | 921 | buffer is used, else the progress is reported in the mode line. |
| 922 | |||
| 923 | @cindex request cancellation | ||
| 924 | @item eglot-advertise-cancellation | ||
| 925 | Setting this variable to true causes Eglot to send special cancellation | ||
| 926 | notification for certain stale client request. This may help some LSP | ||
| 927 | servers avoid doing costly but ultimately useless work on behalf of the | ||
| 928 | client, improving overall performance. | ||
| 922 | @end vtable | 929 | @end vtable |
| 923 | 930 | ||
| 924 | @node Other Variables | 931 | @node Other Variables |