[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 71e47d2 102/139: Fix odd bugs and tweak stuff
From: |
João Távora |
Subject: |
[elpa] externals/eglot 71e47d2 102/139: Fix odd bugs and tweak stuff |
Date: |
Mon, 14 May 2018 09:55:02 -0400 (EDT) |
branch: externals/eglot
commit 71e47d2091005cc69d679c2b5f8cb4f436b57c54
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix odd bugs and tweak stuff
* eglot.el (eglot--log-event): Insert before markers.
(eglot--process-receive): Shave lines.
(xref-backend-references): Use cl-return-from.
(eglot--log-event): Simplify
(eglot-completion-at-point): Saner annotation
---
eglot.el | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/eglot.el b/eglot.el
index 37ad616..546671e 100644
--- a/eglot.el
+++ b/eglot.el
@@ -462,7 +462,7 @@ INTERACTIVE is t if called interactively."
(when interactive (display-buffer buffer))
buffer))
-(defun eglot--log-event (proc message type)
+(defun eglot--log-event (proc message &optional type)
"Log an eglot-related event.
PROC is the current process. MESSAGE is a JSON-like plist. TYPE
is a symbol saying if this is a client or server originated."
@@ -477,7 +477,7 @@ is a symbol saying if this is a client or server
originated."
;; pyls keeps on sending these
(t 'unexpected-thingy)))
(type
- (format "%s-%s" type subtype)))
+ (format "%s-%s" (or type :internal) subtype)))
(goto-char (point-max))
(let ((msg (format "%s%s%s:\n%s\n"
type
@@ -486,7 +486,7 @@ is a symbol saying if this is a client or server
originated."
(pp-to-string message))))
(when error
(setq msg (propertize msg 'face 'error)))
- (insert msg)))))
+ (insert-before-markers msg)))))
(defun eglot--process-receive (proc message)
"Process MESSAGE from PROC."
@@ -500,14 +500,12 @@ is a symbol saying if this is a client or server
originated."
(when err (setf (eglot--status proc) `(,err t)))
(cond (method
;; a server notification or a server request
- (let* ((handler-sym (intern (concat "eglot--server-"
- method))))
+ (let* ((handler-sym (intern (concat "eglot--server-" method))))
(if (functionp handler-sym)
(apply handler-sym proc (append
(plist-get message :params)
(if id `(:id ,id))))
- (eglot--warn "No implementation of method %s yet"
- method)
+ (eglot--warn "No implementation of method %s yet" method)
(when id
(eglot--reply
proc id
@@ -1264,7 +1262,8 @@ DUMMY is ignored"
location-or-locations)))
(cl-defmethod xref-backend-references ((_backend (eql eglot)) identifier)
- (unless (eglot--server-capable :referencesProvider) (cl-return nil))
+ (unless (eglot--server-capable :referencesProvider)
+ (cl-return-from xref-backend-references nil))
(let ((params
(or (get-text-property 0 :textDocumentPositionParams identifier)
(let ((rich (car (member identifier eglot--xref-known-symbols))))
@@ -1316,10 +1315,10 @@ DUMMY is ignored"
:documentation documentation :sortText sortText))
items))))
:annotation-function
- (lambda (what) (let ((detail (get-text-property 0 :detail what))
- (kind-name (get-text-property 0 :kind what)))
- (concat (if detail (format " %s" detail) "")
- (if kind-name (format " (%s)" kind-name) ""))))
+ (lambda (what)
+ (propertize (concat " " (or (get-text-property 0 :detail what)
+ (get-text-property 0 :kind what)))
+ 'face 'font-lock-function-name-face))
:display-sort-function
(lambda (items) (sort items (lambda (a b)
(string-lessp
- [elpa] externals/eglot 889ef20 085/139: Tweak the async request engine., (continued)
- [elpa] externals/eglot 889ef20 085/139: Tweak the async request engine., João Távora, 2018/05/14
- [elpa] externals/eglot 193c57d 075/139: Half-decent xref support, João Távora, 2018/05/14
- [elpa] externals/eglot fc6879f 084/139: Explain why didOpen on after-revert-hook is a bad idea, João Távora, 2018/05/14
- [elpa] externals/eglot 24466a9 096/139: When killing server, always wait 3 seconds, João Távora, 2018/05/14
- [elpa] externals/eglot fceb6bb 090/139: Get rid of eglot--special-buffer-process, João Távora, 2018/05/14
- [elpa] externals/eglot d254f97 082/139: Solve another textDocument/didChange bug, João Távora, 2018/05/14
- [elpa] externals/eglot f257d63 089/139: * eglot.el: Reformat to shave off some lines., João Távora, 2018/05/14
- [elpa] externals/eglot c7bd095 118/139: Improve eglot-eldoc-function, João Távora, 2018/05/14
- [elpa] externals/eglot 3e0f1c3 122/139: Misc little adjustments for readability, João Távora, 2018/05/14
- [elpa] externals/eglot 3dcbc30 109/139: Add minimal headers, commentary and autoloads, João Távora, 2018/05/14
- [elpa] externals/eglot 71e47d2 102/139: Fix odd bugs and tweak stuff,
João Távora <=
- [elpa] externals/eglot 05c67ee 112/139: Adjust flymake integration, João Távora, 2018/05/14
- [elpa] externals/eglot 9ff97a6 079/139: Increase request timeout length to 10 seconds, João Távora, 2018/05/14
- [elpa] externals/eglot 571b08f 076/139: Fix the odd bug here and there, João Távora, 2018/05/14
- [elpa] externals/eglot a7ddce6 080/139: Support javascript's javascript-typescript-langserver, João Távora, 2018/05/14
- [elpa] externals/eglot d40f9ac 094/139: Half-decent imenu support via textDocument/documentSymbol, João Távora, 2018/05/14
- [elpa] externals/eglot bbc64b4 087/139: Clean up client capabilities, João Távora, 2018/05/14
- [elpa] externals/eglot 9882bf2 072/139: Cleanup mistake with TextDocumentItem and TextDocumentIdentifier, João Távora, 2018/05/14
- [elpa] externals/eglot 8160cd4 071/139: Handle dynamic registration in general (but nothing specific yet), João Távora, 2018/05/14
- [elpa] externals/eglot c4ffabc 083/139: Half-decent completion support, João Távora, 2018/05/14
- [elpa] externals/eglot d431d41 088/139: Fix bug in hover support, João Távora, 2018/05/14