[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 0ec7801 012/139: Simplify `eglot--protocol-initia
From: |
João Távora |
Subject: |
[elpa] externals/eglot 0ec7801 012/139: Simplify `eglot--protocol-initialize` |
Date: |
Mon, 14 May 2018 09:54:42 -0400 (EDT) |
branch: externals/eglot
commit 0ec78011fee3be96f110fc37756a9baac6595348
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Simplify `eglot--protocol-initialize`
* eglot.el (eglot--protocol-initialize): Simplify
---
eglot.el | 29 +++++++----------------------
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/eglot.el b/eglot.el
index cd91d78..b59ee02 100644
--- a/eglot.el
+++ b/eglot.el
@@ -70,7 +70,7 @@
"Point where next unread message starts")
(eglot--define-process-var eglot--short-name nil
- "A short name")
+ "A short name for the process")
(eglot--define-process-var eglot--expected-bytes nil
"How many bytes declared by server")
@@ -81,6 +81,9 @@
(eglot--define-process-var eglot--events-buffer nil
"A buffer pretty-printing the EGLOT RPC events")
+(eglot--define-process-var eglot--capabilities :unreported
+ "Holds list of capabilities that server reported")
+
(cl-defmacro eglot--request (process
method
params
@@ -367,29 +370,11 @@
:capabilities (:workspace (:executeCommand
(:dynamicRegistration t))
:textDocument (:synchronization
(:didSave t))))
(lambda (&key capabilities)
- (cl-destructuring-bind
- (&rest all
- &key
- ;; capabilities reported by server
- _textDocumentSync
- _hoverProvider
- _completionProvider
- _definitionProvider
- _referencesProvider
- _documentHighlightProvider
- _documentSymbolProvider
- _workspaceSymbolProvider
- _codeActionProvider
- _documentFormattingProvider
- _documentRangeFormattingProvider
- _renameProvider
- _executeCommandProvider
- )
- capabilities
- (when interactive
+ (setf (eglot--capabilities process) capabilities)
+ (when interactive
(eglot--message
"So yeah I got lots (%d) of capabilities"
- (length all)))))))
+ (length capabilities))))))
(defun eglot-quit-server (process &optional sync)
(interactive (list (eglot--current-process-or-lose)))
- [elpa] externals/eglot 3a8f9a1 002/139: Remove a couple of comments, (continued)
- [elpa] externals/eglot 3a8f9a1 002/139: Remove a couple of comments, João Távora, 2018/05/14
- [elpa] externals/eglot 72895ca 006/139: Handle notifications, João Távora, 2018/05/14
- [elpa] externals/eglot 0222e7e 007/139: Improve `eglot--current-process', João Távora, 2018/05/14
- [elpa] externals/eglot 2775dea 003/139: Rename eglot--continuations eglot--pending-continuations, João Távora, 2018/05/14
- [elpa] externals/eglot c417eb4 009/139: Cancel timeouts when process dies unexpectedly, João Távora, 2018/05/14
- [elpa] externals/eglot 6f0a8df 008/139: Organize a bit, João Távora, 2018/05/14
- [elpa] externals/eglot c222c3b 019/139: Lay groundwork for uniform treatment of network connections, João Távora, 2018/05/14
- [elpa] externals/eglot 3489176 004/139: Add a mode-line construct and some minor fanciness, João Távora, 2018/05/14
- [elpa] externals/eglot dfab9a0 011/139: Experimental diagnostic overlays, João Távora, 2018/05/14
- [elpa] externals/eglot 16be2fc 020/139: Fix parser to accept multiple messages in one chunk, João Távora, 2018/05/14
- [elpa] externals/eglot 0ec7801 012/139: Simplify `eglot--protocol-initialize`,
João Távora <=
- [elpa] externals/eglot 4f246b5 017/139: * eglot.el (eglot-mode-map): Move up before minor mode., João Távora, 2018/05/14
- [elpa] externals/eglot bc011d0 010/139: Minor cleanup, João Távora, 2018/05/14
- [elpa] externals/eglot e60c7fc 013/139: Overhaul async mechanism safety, João Távora, 2018/05/14
- [elpa] externals/eglot a4f99e0 005/139: Introduce and use `eglot--current-process-or-lose', João Távora, 2018/05/14
- [elpa] externals/eglot efd14d6 015/139: Fix mode line, João Távora, 2018/05/14
- [elpa] externals/eglot 63f2208 030/139: Less obstrusive flymake stuff for now, João Távora, 2018/05/14
- [elpa] externals/eglot 8bd634c 016/139: Start working on this again, João Távora, 2018/05/14
- [elpa] externals/eglot 3403f86 027/139: Correctly report what we currently are capable of, João Távora, 2018/05/14
- [elpa] externals/eglot 7c82a03 024/139: Start experimenting with python, João Távora, 2018/05/14
- [elpa] externals/eglot 8e6488f 023/139: Don't switch to possibly dead buffer in sentinel, João Távora, 2018/05/14