[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 71e47d2 102/139: Fix odd bugs and tweak stuff
From: |
João Távora |
Subject: |
[elpa] externals/elpa 71e47d2 102/139: Fix odd bugs and tweak stuff |
Date: |
Mon, 14 May 2018 09:53:44 -0400 (EDT) |
branch: externals/elpa
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/elpa 6e76b08 100/139: Support workspace/applyEdit, (continued)
- [elpa] externals/elpa 6e76b08 100/139: Support workspace/applyEdit, João Távora, 2018/05/14
- [elpa] externals/elpa 3e0f1c3 122/139: Misc little adjustments for readability, João Távora, 2018/05/14
- [elpa] externals/elpa 9bf3166 136/139: Don't define a menu if nothing to show there for now, João Távora, 2018/05/14
- [elpa] externals/elpa 1fb2bcb 132/139: Ask server for textDocument/signatureHelp if it supports it, João Távora, 2018/05/14
- [elpa] externals/elpa c7bd095 118/139: Improve eglot-eldoc-function, João Távora, 2018/05/14
- [elpa] externals/elpa ab575d2 120/139: Rename functions. eglot--request is now the synchronous one, João Távora, 2018/05/14
- [elpa] externals/elpa 8448d9b 133/139: Work with any old directory, no formal project needed, João Távora, 2018/05/14
- [elpa] externals/elpa 589e1ea 138/139: Remove an unused variable, João Távora, 2018/05/14
- [elpa] externals/elpa 571b08f 076/139: Fix the odd bug here and there, João Távora, 2018/05/14
- [elpa] externals/elpa c4ffabc 083/139: Half-decent completion support, João Távora, 2018/05/14
- [elpa] externals/elpa 71e47d2 102/139: Fix odd bugs and tweak stuff,
João Távora <=
- [elpa] externals/elpa ecd334f 101/139: Update README, João Távora, 2018/05/14
- [elpa] externals/elpa dda11dd 095/139: Try to fix some textDocument/completion bugs, João Távora, 2018/05/14
- [elpa] externals/elpa bfd82b5 108/139: Fancier RLS spinner, João Távora, 2018/05/14
- [elpa] externals/elpa c7b9002 116/139: Only call deferred actions after a full message has been received, João Távora, 2018/05/14
- [elpa] externals/elpa dc08e8e 134/139: Fix automatic project creation, João Távora, 2018/05/14
- [elpa] externals/elpa e63dad0 092/139: Simplify mode-line code with a helper., João Távora, 2018/05/14
- [elpa] externals/elpa e964abe 091/139: Get rid of eglot--buffer-open-count, João Távora, 2018/05/14
- [elpa] externals/elpa 37b7329 098/139: Reasonable textDocument/documentHighlight support, João Távora, 2018/05/14
- [elpa] externals/elpa 29f6b4c 129/139: Tweak README.md, João Távora, 2018/05/14
- [elpa] externals/elpa 764347d 128/139: New command eglot-help-at-point and a README update, João Távora, 2018/05/14