diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index 6059131cf21..49dd32e51b2 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -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) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 048dbca557a..fb48656ee05 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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