[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa dda11dd 095/139: Try to fix some textDocument/comp
From: |
João Távora |
Subject: |
[elpa] externals/elpa dda11dd 095/139: Try to fix some textDocument/completion bugs |
Date: |
Mon, 14 May 2018 09:53:43 -0400 (EDT) |
branch: externals/elpa
commit dda11dde6db5c91cdede6a10e9609aad3826bf2a
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Try to fix some textDocument/completion bugs
* eglot.el (eglot-completion-at-point): Rework slightly.
---
eglot.el | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/eglot.el b/eglot.el
index d7ea329..2e409ef 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1274,13 +1274,13 @@ DUMMY is ignored"
(defun eglot-completion-at-point ()
"EGLOT's `completion-at-point' function."
- (let ((bounds (bounds-of-thing-at-point 'sexp))
+ (let ((bounds (bounds-of-thing-at-point 'symbol))
(proc (eglot--current-process-or-lose)))
(when (eglot--server-capable :completionProvider)
(list
(or (car bounds) (point))
(or (cdr bounds) (point))
- (completion-table-dynamic
+ (completion-table-with-cache
(lambda (_ignored)
(let* ((resp (eglot--sync-request
proc
@@ -1291,19 +1291,17 @@ DUMMY is ignored"
(items (if (vectorp resp) resp (plist-get resp :items))))
(eglot--mapply
(eglot--lambda (&key insertText label kind detail
- documentation sortText)
- (propertize insertText
- :label label :kind kind :detail detail
+ documentation sortText &allow-other-keys)
+ (propertize (or insertText label)
+ :kind-name (cdr (assoc kind eglot--kind-names))
+ :detail detail
:documentation documentation :sortText sortText))
items))))
:annotation-function
(lambda (what) (let ((detail (get-text-property 0 :detail what))
- (kind (get-text-property 0 :kind what)))
- (format "%s%s"
- detail
- (if kind
- (format " (%s)" (cdr (assoc kind
eglot--kind-names)))
- ""))))
+ (kind-name (get-text-property 0 :kind what)))
+ (concat (if detail (format " %s" detail) "")
+ (if kind-name (format " (%s)" kind-name) ""))))
:display-sort-function
(lambda (items) (sort items (lambda (a b)
(string-lessp
- [elpa] externals/elpa 9bf3166 136/139: Don't define a menu if nothing to show there for now, (continued)
- [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, 2018/05/14
- [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 <=
- [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