emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 543483a 13/16: Close #37: Unbreak completion when


From: João Távora
Subject: [elpa] externals/eglot 543483a 13/16: Close #37: Unbreak completion when no possible annotation
Date: Mon, 9 Jul 2018 17:27:14 -0400 (EDT)

branch: externals/eglot
commit 543483a10e52726296e3593b4199c42da44ad84c
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Close #37: Unbreak completion when no possible annotation
    
    * eglot.el (eglot-completion-at-point): Handle case where no doc,
    detail or kind.
---
 eglot.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/eglot.el b/eglot.el
index 509fe6c..fd63338 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1225,11 +1225,14 @@ DUMMY is ignored."
        (lambda (obj)
          (cl-destructuring-bind (&key detail documentation kind 
&allow-other-keys)
              (text-properties-at 0 obj)
-           (concat " " (propertize
-                        (or (and documentation
-                                 (replace-regexp-in-string "\n.*" "" 
documentation))
-                            detail (cdr (assoc kind eglot--kind-names)))
-                        'face 'font-lock-function-name-face))))
+           (let ((annotation
+                  (or (and documentation
+                           (replace-regexp-in-string "\n.*" "" documentation))
+                      detail
+                      (cdr (assoc kind eglot--kind-names)))))
+             (when annotation
+               (concat " " (propertize annotation
+                                       'face 
'font-lock-function-name-face))))))
        :display-sort-function
        (lambda (items)
          (sort items (lambda (a b)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]