tag: 1.2
commit 240f88cb4e317cb36bef7c929603c411bb4f104e
Author: Fangrui Song <[email protected]>
Commit: João Távora <[email protected]>
Don't warn on implementation-specific notifications (#93)
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 $.
---
eglot.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 4ff7337..2ef2259 100644
--- a/eglot.el
+++ b/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)