[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 97ed4ca 49/49: Close #643: add new command eglot-
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot 97ed4ca 49/49: Close #643: add new command eglot-shutdown-all |
Date: |
Wed, 17 Mar 2021 18:41:51 -0400 (EDT) |
branch: externals/eglot
commit 97ed4caff5f6c09910ef6bfa64671d25a8a6772b
Author: bc² <odanoburu@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Close #643: add new command eglot-shutdown-all
Also closes #644
Co-authored-by: João Távora <joaotavora@gmail.com>
Copyright-paperwork-exempt: yes
* NEWS.md: mention new command
* README.md (Commands and keybindings): mention new command. Tweak
documentation for eglot-shutdown and eglot-reconnect.
* eglot.el (eglot-shutdown): Tweak docstring.
(eglot-shutdown-all): New command.
---
NEWS.md | 5 ++++-
README.md | 6 ++++--
eglot.el | 12 ++++++++++--
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index ced91b6..d060ad4 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,7 +5,7 @@
Thanks to Brian Cully for the minimalist approach.
(also thanks to Felipe Lema who conducted many early experiments in
-#463)
+[#463][github#463])
##### Code action shortcuts ([#411][github#411])
@@ -18,6 +18,8 @@ actions directly (`eglot-code-action-inline`,
actions with specific a kind by calling `eglot-code-actions` from
elisp.
+##### New command `eglot-shutdown-server` ([#643][github#643])
+
# 1.7 (16/12/2020)
##### Support hierarchical symbols in Imenu ([#303][github#303])
@@ -260,3 +262,4 @@ and now said bunch of references-->
[github#481]: https://github.com/joaotavora/eglot/issues/481
[github#494]: https://github.com/joaotavora/eglot/issues/494
[github#637]: https://github.com/joaotavora/eglot/issues/637
+[github#643]: https://github.com/joaotavora/eglot/issues/643
diff --git a/README.md b/README.md
index bb0225a..28e7b61 100644
--- a/README.md
+++ b/README.md
@@ -226,9 +226,11 @@ Here's a summary of available commands:
- `M-x eglot`, as described above;
-- `M-x eglot-reconnect` reconnects to the server;
+- `M-x eglot-reconnect` reconnects to current server;
-- `M-x eglot-shutdown` says bye-bye to the server;
+- `M-x eglot-shutdown` says bye-bye to server of your choice;
+
+- `M-x eglot-shutdown-all` says bye-bye to every server;
- `M-x eglot-rename` ask the server to rename the symbol at point;
diff --git a/eglot.el b/eglot.el
index 79b9088..0341ffd 100644
--- a/eglot.el
+++ b/eglot.el
@@ -652,11 +652,12 @@ Interactively, read SERVER from the minibuffer unless
there is
only one and it's managing the current buffer.
Forcefully quit it if it doesn't respond within TIMEOUT seconds.
-Don't leave this function with the server still running.
+TIMEOUT defaults to 1.5 seconds. Don't leave this function with
+the server still running.
If PRESERVE-BUFFERS is non-nil (interactively, when called with a
prefix argument), do not kill events and output buffers of
-SERVER. ."
+SERVER."
(interactive (list (eglot--read-server "Shutdown which server"
(eglot-current-server))
t nil current-prefix-arg))
@@ -670,6 +671,13 @@ SERVER. ."
(jsonrpc-shutdown server (not preserve-buffers))
(unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))
+(defun eglot-shutdown-all (&optional preserve-buffers)
+ "Politely ask all language servers to quit, in order.
+PRESERVE-BUFFERS as in `eglot-shutdown', which see."
+ (interactive (list current-prefix-arg))
+ (cl-loop for ss being the hash-values of eglot--servers-by-project
+ do (cl-loop for s in ss do (eglot-shutdown s nil
preserve-buffers))))
+
(defun eglot--on-shutdown (server)
"Called by jsonrpc.el when SERVER is already dead."
;; Turn off `eglot--managed-mode' where appropriate.
- [elpa] externals/eglot 8305eed 18/49: * eglot.el (eglot): Tweak docstring grammar., (continued)
- [elpa] externals/eglot 8305eed 18/49: * eglot.el (eglot): Tweak docstring grammar., Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 50b0e84 22/49: Fix #602: fully handle LSP glob syntax, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 550ffc2 34/49: Per #602: tweak glob-parsing grammar, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 133c25e 24/49: Close #613: explicitly require seq.el, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot a43289e 25/49: Fix #616: also override global flymake-diagnostic-functions, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot fc4c324 29/49: Fix #567: update elixir-ls link in README.md, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 7918fac 43/49: Close #637: Add TRAMP support, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 33e83ba 44/49: Fix #638: convert colon to hex in URI, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot bf4a7aa 31/49: Fix #406: mention eglot-stay-out-of in README.md, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 65aadca 46/49: Fix #620: simplify eglot--apply-workspace-edit, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 97ed4ca 49/49: Close #643: add new command eglot-shutdown-all,
Stefan Monnier <=
- [elpa] externals/eglot f9df418 06/49: Fix #584: Define a face for symbol highlight, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot cb58b72 15/49: Close #603: add fortls for Fotran (f90-mode), Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 147f3b0 16/49: Close #411: offer shortcut commands to commonly invoked code actions, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 99f8d7b 17/49: Per #604: mention common installation pitfalls in README.md, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 2879b83 19/49: * README.md: Mention Google Open Source Peer Bonus, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot d5b840b 20/49: Fix #606, #Fix 608: fix bug in eglot-code-actions, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot eac5264 21/49: Fix #609: flush pending changes to server before code actions request, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot f68f829 26/49: Close #566: prefer typescript-language-server for JS&TS, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot c73f5ed 27/49: Fix #612: remove duplicate entry for "Registration" LSP type, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 4ae5a44 28/49: Fix #568: update gopls URL in README.md, Stefan Monnier, 2021/03/17