[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot dda11dd 095/139: Try to fix some textDocument/com
From: |
João Távora |
Subject: |
[elpa] externals/eglot dda11dd 095/139: Try to fix some textDocument/completion bugs |
Date: |
Mon, 14 May 2018 09:55:01 -0400 (EDT) |
branch: externals/eglot
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/eglot f1b6485 053/139: Trim some edges and add a bunch of boring RPC methods, (continued)
- [elpa] externals/eglot f1b6485 053/139: Trim some edges and add a bunch of boring RPC methods, João Távora, 2018/05/14
- [elpa] externals/eglot 0e95167 042/139: Watch for files opened under umbrella of existing process, João Távora, 2018/05/14
- [elpa] externals/eglot 4d4b85d 061/139: eglot-editing-mode becomes eglot--managed-mode, João Távora, 2018/05/14
- [elpa] externals/eglot e7ffc31 067/139: Make reported capabilities into its own function, João Távora, 2018/05/14
- [elpa] externals/eglot 79a2a1e 069/139: Be quite explicit about our lack of capabilities right now, João Távora, 2018/05/14
- [elpa] externals/eglot 95187cf 058/139: Connect to LSP server via TCP, João Távora, 2018/05/14
- [elpa] externals/eglot f76f04e 057/139: More correctly keep track of didOpen/didClose per buffer, João Távora, 2018/05/14
- [elpa] externals/eglot 46bb1c0 049/139: Reorganize file, João Távora, 2018/05/14
- [elpa] externals/eglot ff5a03d 074/139: Very basic xref support, João Távora, 2018/05/14
- [elpa] externals/eglot e9b5e54 077/139: ETOOMANYLAMBDAS, João Távora, 2018/05/14
- [elpa] externals/eglot dda11dd 095/139: Try to fix some textDocument/completion bugs,
João Távora <=
- [elpa] externals/eglot ea918ab 066/139: Include source info in diagnostics, João Távora, 2018/05/14
- [elpa] externals/eglot a199c8e 070/139: Honour textDocumentSync, João Távora, 2018/05/14
- [elpa] externals/eglot e86f9b4 073/139: New helper eglot--sync-request, João Távora, 2018/05/14
- [elpa] externals/eglot 1add335 078/139: Workaround two suspected Emacs bugs, João Távora, 2018/05/14
- [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