[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 56c2e1d 104/139: Get rid of eglot-mode
From: |
João Távora |
Subject: |
[elpa] externals/elpa 56c2e1d 104/139: Get rid of eglot-mode |
Date: |
Mon, 14 May 2018 09:53:44 -0400 (EDT) |
branch: externals/elpa
commit 56c2e1dec4413e146242e97714867c0c9a6ed947
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Get rid of eglot-mode
* eglot.el (eglot--managed-mode): Don't call eglot-mode. When
shutting down, offer to kill server.
(mode-line-misc-info): Update to use eglot--managed-mode
---
eglot.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/eglot.el b/eglot.el
index 3eb43ce..bed98ed 100644
--- a/eglot.el
+++ b/eglot.el
@@ -769,7 +769,6 @@ Meaning only return locally if successful, otherwise exit
non-locally."
nil nil eglot-mode-map
(cond
(eglot--managed-mode
- (eglot-mode 1)
(add-hook 'after-change-functions 'eglot--after-change nil t)
(add-hook 'before-change-functions 'eglot--before-change nil t)
(add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t)
@@ -796,11 +795,10 @@ Meaning only return locally if successful, otherwise exit
non-locally."
(remove-hook 'completion-at-point-functions #'eglot-completion-at-point t)
(remove-function (local 'eldoc-documentation-function)
#'eglot-eldoc-function)
- (remove-function (local imenu-create-index-function) #'eglot-imenu))))
-
-(define-minor-mode eglot-mode
- "Minor mode for all buffers managed by EGLOT in some way." nil
- nil eglot-mode-map)
+ (remove-function (local imenu-create-index-function) #'eglot-imenu)
+ (let ((proc (eglot--current-process)))
+ (when (and (process-live-p proc) (y-or-n-p "[eglot] Kill server too? "))
+ (eglot-shutdown proc nil t))))))
(defun eglot--buffer-managed-p (&optional proc)
"Tell if current buffer is managed by PROC."
@@ -886,7 +884,8 @@ Uses THING, FACE, DEFS and PREPEND."
(mouse-3 eglot-clear-status "clear this status"))
(format "%d pending requests\n" pending)))))))))
-(add-to-list 'mode-line-misc-info `(eglot-mode (" [" eglot--mode-line-format
"] ")))
+(add-to-list 'mode-line-misc-info
+ `(eglot--managed-mode (" [" eglot--mode-line-format "] ")))
;;; Protocol implementation (Requests, notifications, etc)
- [elpa] externals/elpa e86f9b4 073/139: New helper eglot--sync-request, (continued)
- [elpa] externals/elpa e86f9b4 073/139: New helper eglot--sync-request, João Távora, 2018/05/14
- [elpa] externals/elpa 95187cf 058/139: Connect to LSP server via TCP, João Távora, 2018/05/14
- [elpa] externals/elpa f8bfb7e 064/139: Handle requests from server correctly, João Távora, 2018/05/14
- [elpa] externals/elpa 8160cd4 071/139: Handle dynamic registration in general (but nothing specific yet), João Távora, 2018/05/14
- [elpa] externals/elpa 9ff97a6 079/139: Increase request timeout length to 10 seconds, João Távora, 2018/05/14
- [elpa] externals/elpa 193c57d 075/139: Half-decent xref support, João Távora, 2018/05/14
- [elpa] externals/elpa d254f97 082/139: Solve another textDocument/didChange bug, João Távora, 2018/05/14
- [elpa] externals/elpa a7ddce6 080/139: Support javascript's javascript-typescript-langserver, João Távora, 2018/05/14
- [elpa] externals/elpa af14364 093/139: Only request stuff that server says it's capable of, João Távora, 2018/05/14
- [elpa] externals/elpa d33a9b5 103/139: Simplify eglot--signal-textDocument/didChange, João Távora, 2018/05/14
- [elpa] externals/elpa 56c2e1d 104/139: Get rid of eglot-mode,
João Távora <=
- [elpa] externals/elpa bbc64b4 087/139: Clean up client capabilities, João Távora, 2018/05/14
- [elpa] externals/elpa 23b79e0 111/139: Shorten summary line to appease package-lint.el, João Távora, 2018/05/14
- [elpa] externals/elpa 24466a9 096/139: When killing server, always wait 3 seconds, João Távora, 2018/05/14
- [elpa] externals/elpa 3a6c637 099/139: Support textDocument/rename, João Távora, 2018/05/14
- [elpa] externals/elpa 458bc69 110/139: More correctly setup rust-mode-related autoloads, João Távora, 2018/05/14
- [elpa] externals/elpa 3dcbc30 109/139: Add minimal headers, commentary and autoloads, João Távora, 2018/05/14
- [elpa] externals/elpa 581608f 115/139: Resist server failure during synchronous requests, João Távora, 2018/05/14
- [elpa] externals/elpa 41f5922 137/139: Now send willSaveWaitUntil, João Távora, 2018/05/14
- [elpa] externals/elpa 05c67ee 112/139: Adjust flymake integration, João Távora, 2018/05/14
- [elpa] externals/elpa f89f859 114/139: Simplify mode-line updating logic, João Távora, 2018/05/14