Eglot: default eglot-advertise-cancellation to t

The current 2026 landscape suggests servers (especially gopls
and ocamllsp) take advantage of this, so let's give it to them
by default.

* lisp/progmodes/eglot.el (eglot-advertise-cancellation):
Default to t.

* etc/EGLOT-NEWS: Mention change.
This commit is contained in:
João Távora 2026-01-14 11:09:47 +00:00
parent 155f524f03
commit b40e89e523
2 changed files with 12 additions and 1 deletions

View file

@ -17,6 +17,17 @@ This refers to https://github.com/joaotavora/eglot/issues/. That is,
to look up issue github#1234, go to
https://github.com/joaotavora/eglot/issues/1234.
* Changes to upcoming Eglot
** 'eglot-advertise-cancellation' now defaults to t
The variable 'eglot-advertise-cancellation' now defaults to t, which
means Eglot will send '$/cancelRequest' notifications to servers when it
thinks responses to inflight requests are no longer useful. The current
2026 LSP landscape (especially gopls and ocamllsp) suggests this is
beneficial and helps servers avoid costly useless work.
* Changes in Eglot 1.21 (11/1/2026)

View file

@ -583,7 +583,7 @@ under cursor."
(const :tag "Call hierarchies" :callHierarchyProvider)
(const :tag "On-demand \"pull\" diagnostics" :diagnosticProvider)))
(defcustom eglot-advertise-cancellation nil
(defcustom eglot-advertise-cancellation t
"If non-nil, Eglot attempts to inform server of canceled requests.
This is done by sending an additional '$/cancelRequest' notification
every time Eglot decides to forget a request. The effect of this