[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 5d88eed 06/62: Close #39: Handle experimental/unk
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot 5d88eed 06/62: Close #39: Handle experimental/unknown server methods gracefully |
Date: |
Sat, 29 Sep 2018 17:13:28 -0400 (EDT) |
branch: externals/eglot
commit 5d88eeddaaba98bdc90e661a0bab71c8c12a84bb
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Close #39: Handle experimental/unknown server methods gracefully
* eglot.el (eglot-handle-notification t t, eglot-handle-request t
t): Add default handlers for unknown methods.
(eglot-handle-notification $cquery/progress)
(eglot-handle-notification $cquery/setInactiveRegions)
(eglot-handle-notification $cquery/publishSemanticHighlighting):
Remove these no-ops.
---
eglot.el | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/eglot.el b/eglot.el
index 8d61bbb..77f8260 100644
--- a/eglot.el
+++ b/eglot.el
@@ -857,6 +857,16 @@ Uses THING, FACE, DEFS and PREPEND."
;;; Protocol implementation (Requests, notifications, etc)
;;;
(cl-defmethod eglot-handle-notification
+ (_server method &key)
+ "Handle unknown notification"
+ (eglot--warn "Server sent unknown notification method `%s'" method))
+
+(cl-defmethod eglot-handle-request
+ (_server method &key)
+ "Handle unknown request"
+ (jsonrpc-error "Unknown request method `%s'" method))
+
+(cl-defmethod eglot-handle-notification
(_server (_method (eql window/showMessage)) &key type message)
"Handle notification window/showMessage"
(eglot--message (propertize "Server reports (type=%s): %s"
@@ -1582,21 +1592,6 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
(list :cacheDirectory (file-name-as-directory cache)
:progressReportFrequencyMs -1)))
-(cl-defmethod eglot-handle-notification
- ((_server eglot-cquery) (_method (eql $cquery/progress))
- &rest counts &key _activeThreads &allow-other-keys)
- "No-op for noisy $cquery/progress extension")
-
-(cl-defmethod eglot-handle-notification
- ((_server eglot-cquery) (_method (eql $cquery/setInactiveRegions))
- &key _uri _inactiveRegions &allow-other-keys)
- "No-op for unsupported $cquery/setInactiveRegions extension")
-
-(cl-defmethod eglot-handle-notification
- ((_server eglot-cquery) (_method (eql $cquery/publishSemanticHighlighting))
- &key _uri _symbols &allow-other-keys)
- "No-op for unsupported $cquery/publishSemanticHighlighting extension")
-
;; FIXME: A horrible hack of Flymake's insufficient API that must go
;; into Emacs master, or better, 26.2
- [elpa] externals/eglot updated (07b235f -> 821b498), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot ad98247 02/62: jsonrpc must be available when compiling, too, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot d936fbd 01/62: Install jsonrpc package when running tests, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 0c85b8f 05/62: Tests only kill server-related buffers when successfull, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 400623f 03/62: Test with Emacs 26.1, not the 26 pre-release, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 5d88eed 06/62: Close #39: Handle experimental/unknown server methods gracefully,
Stefan Monnier <=
- [elpa] externals/eglot 3ac4b64 04/62: * Makefile (JSONRPC): Call package-refresh-contents, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 8d61eca 09/62: Close #44: Don't turn on flymake-mode any more than is needed, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot a57d5d8 07/62: Close #29: Implement workspace/didChangeConfiguration (#40), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 616ad53 13/62: Close #48: be less verbose when using eglot-ensure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot eeb34c6 21/62: Default eglot-handle-notifictiona|request must &allow-other-keys, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 04f7db7 10/62: Per #48: Fix messages of eglot-ensure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 5808c0d 11/62: Add entry for haskell-ide-engine in eglot-server-programs (#49), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot ec02ffa 14/62: Work around Emacs bugs 32237, 32278 (#53), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot e476411 19/62: Close #58: Erase company-doc buffer in between doc requests, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot dfaa389 12/62: * README.md (Installation and usage): Add haskell-ide-engine, Stefan Monnier, 2018/09/29