From acda0eda5a8599d8a843eb3c9dc214d80593853f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 7 Sep 2018 02:00:18 -0700 Subject: [PATCH] Don't warn on implementation-specific notifications () MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only warn when method name doesn't start with '$'. Per the spec: "if a server or client receives notifications or requests starting with ‘$/’ it is free to ignore them if they are unknown." * eglot.el (eglot-handle-notification t t): Check method name for $. GitHub-reference: https://github.com/joaotavora/eglot/issues/93 --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4ff7337d11e..2ef22593e06 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -987,7 +987,8 @@ Uses THING, FACE, DEFS and PREPEND." (cl-defmethod eglot-handle-notification (_server method &key &allow-other-keys) "Handle unknown notification" - (eglot--warn "Server sent unknown notification method `%s'" method)) + (unless (string-prefix-p "$" method) + (eglot--warn "Server sent unknown notification method `%s'" method))) (cl-defmethod eglot-handle-request (_server method &key &allow-other-keys) -- 2.39.2