[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 72895ca 006/139: Handle notifications
From: |
João Távora |
Subject: |
[elpa] externals/elpa 72895ca 006/139: Handle notifications |
Date: |
Mon, 14 May 2018 09:53:24 -0400 (EDT) |
branch: externals/elpa
commit 72895ca4565db0ffa5d076718729072d47465f55
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Handle notifications
---
eglot.el | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index 5ca6833..6e3a136 100644
--- a/eglot.el
+++ b/eglot.el
@@ -287,8 +287,13 @@
(t
(apply (first continuations) (plist-get message :result)))))
(t
- (eglot--debug "No implemetation for notification %s yet"
- (plist-get message :method))))))
+ (let* ((method (plist-get message :method))
+ (handler-sym (intern (concat "eglot--"
+ method))))
+ (if (functionp handler-sym)
+ (apply handler-sym proc (plist-get message :params))
+ (eglot--debug "No implemetation for notification %s yet"
+ method)))))))
(defvar eglot--expect-carriage-return nil)
@@ -391,6 +396,14 @@
(length all)))))))
(defun eglot--debug (format &rest args)
+
+;;; Notifications
+;;;
+(cl-defun eglot--textDocument/publishDiagnostics
+ (_process &key uri diagnostics)
+ "Handle notification publishDiagnostics"
+ (eglot--message "So yeah I got %s for %s"
+ diagnostics uri))
(display-warning 'eglot
(apply #'format format args)
:debug))
- [elpa] branch externals/elpa created (now 4c0bfc3), João Távora, 2018/05/14
- [elpa] externals/elpa 3a8f9a1 002/139: Remove a couple of comments, João Távora, 2018/05/14
- [elpa] externals/elpa 72895ca 006/139: Handle notifications,
João Távora <=
- [elpa] externals/elpa efd14d6 015/139: Fix mode line, João Távora, 2018/05/14
- [elpa] externals/elpa c222c3b 019/139: Lay groundwork for uniform treatment of network connections, João Távora, 2018/05/14
- [elpa] externals/elpa 16be2fc 020/139: Fix parser to accept multiple messages in one chunk, João Távora, 2018/05/14
- [elpa] externals/elpa 6f0a8df 008/139: Organize a bit, João Távora, 2018/05/14
- [elpa] externals/elpa 0222e7e 007/139: Improve `eglot--current-process', João Távora, 2018/05/14
- [elpa] externals/elpa 7c82a03 024/139: Start experimenting with python, João Távora, 2018/05/14
- [elpa] externals/elpa 8bd634c 016/139: Start working on this again, João Távora, 2018/05/14
- [elpa] externals/elpa dfab9a0 011/139: Experimental diagnostic overlays, João Távora, 2018/05/14
- [elpa] externals/elpa 22dc2f7 034/139: Ready to start fixing flymake integration, João Távora, 2018/05/14
- [elpa] externals/elpa 931093e 032/139: Don't clutter UI with warnings, João Távora, 2018/05/14