[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 6f0a8df 008/139: Organize a bit
From: |
João Távora |
Subject: |
[elpa] externals/elpa 6f0a8df 008/139: Organize a bit |
Date: |
Mon, 14 May 2018 09:53:25 -0400 (EDT) |
branch: externals/elpa
commit 6f0a8dffc75c053df1f4e952ee0826df5195c798
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Organize a bit
---
eglot.el | 50 ++++++++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/eglot.el b/eglot.el
index c7f8774..e3b288b 100644
--- a/eglot.el
+++ b/eglot.el
@@ -148,25 +148,6 @@
(format "\n-----------------------------------\n"))))
(eglot--protocol-initialize proc interactive))))))
-(defun eglot-quit-server (process &optional sync)
- (interactive (list (eglot--current-process-or-lose)))
- (eglot--message "Asking server to terminate")
- (eglot--request
- process
- :shutdown
- nil
- (lambda (&rest _anything)
- (eglot--message "Now asking server to exit")
- (process-put process 'eglot--moribund t)
- (eglot--process-send process
- `(:jsonrpc "2.0"
- :method :exit)))
- :async-p (not sync)
- :timeout-fn (lambda ()
- (eglot--warn "Brutally deleting existing process %s"
- process)
- (process-put process 'eglot--moribund t)
- (delete-process process))))
(defun eglot--process-sentinel (process change)
(with-current-buffer (process-buffer process)
@@ -359,6 +340,9 @@
(eglot--error "Process %s died unexpectedly" process))
(accept-process-output nil 0.01))))))
+
+;;; Requests
+;;;
(defun eglot--protocol-initialize (process interactive)
(eglot--request
@@ -366,6 +350,7 @@
:initialize
`(:processId ,(emacs-pid)
:rootPath ,(concat "" ;; FIXME RLS doesn't like "file://"
+ "file://"
(expand-file-name (car (project-roots
(project-current)))))
:initializationOptions []
@@ -396,7 +381,26 @@
"So yeah I got lots (%d) of capabilities"
(length all)))))))
-(defun eglot--debug (format &rest args)
+(defun eglot-quit-server (process &optional sync)
+ (interactive (list (eglot--current-process-or-lose)))
+ (eglot--message "Asking server to terminate")
+ (eglot--request
+ process
+ :shutdown
+ nil
+ (lambda (&rest _anything)
+ (eglot--message "Now asking server to exit")
+ (process-put process 'eglot--moribund t)
+ (eglot--process-send process
+ `(:jsonrpc "2.0"
+ :method :exit)))
+ :async-p (not sync)
+ :timeout-fn (lambda ()
+ (eglot--warn "Brutally deleting existing process %s"
+ process)
+ (process-put process 'eglot--moribund t)
+ (delete-process process))))
+
;;; Notifications
;;;
@@ -405,6 +409,12 @@
"Handle notification publishDiagnostics"
(eglot--message "So yeah I got %s for %s"
diagnostics uri))
+
+
+;;; Helpers
+;;;
+(defun
+ eglot--debug (format &rest args)
(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, 2018/05/14
- [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 <=
- [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
- [elpa] externals/elpa c948713 035/139: Auto-reconnect on unexpected connection loss, João Távora, 2018/05/14
- [elpa] externals/elpa 3489176 004/139: Add a mode-line construct and some minor fanciness, João Távora, 2018/05/14
- [elpa] externals/elpa bc011d0 010/139: Minor cleanup, João Távora, 2018/05/14
- [elpa] externals/elpa e1d36d2 014/139: Fix some byte-compilation warnings, João Távora, 2018/05/14