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

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

[elpa] externals/eglot b393c48 14/22: Fix previous commit where workarou


From: João Távora
Subject: [elpa] externals/eglot b393c48 14/22: Fix previous commit where workaround had been removed
Date: Sat, 5 Jan 2019 09:31:04 -0500 (EST)

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

    Fix previous commit where workaround had been removed
    
    Do remove the workaround, but not more than that.
    
    * eglot.el (eglot-completion-at-point): set local var strings.
---
 eglot.el | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/eglot.el b/eglot.el
index 43bc023..5861b05 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1822,19 +1822,21 @@ is not active."
                                         :deferred :textDocument/completion
                                         :cancel-on-input t))
                  (items (if (vectorp resp) resp (plist-get resp :items))))
-            (mapcar
-             (jsonrpc-lambda (&rest all &key label insertText insertTextFormat
-                                    &allow-other-keys)
-               (let ((completion
-                      (cond ((and (eql insertTextFormat 2)
-                                  (eglot--snippet-expansion-fn))
-                             (string-trim-left label))
-                            (t
-                             (or insertText (string-trim-left label))))))
-                 (add-text-properties 0 1 all completion)
-                 (put-text-property 0 1 'eglot--lsp-completion all completion)
-                 completion))
-             items))))
+            (setq
+             strings
+             (mapcar
+              (jsonrpc-lambda (&rest all &key label insertText insertTextFormat
+                                     &allow-other-keys)
+                (let ((completion
+                       (cond ((and (eql insertTextFormat 2)
+                                   (eglot--snippet-expansion-fn))
+                              (string-trim-left label))
+                             (t
+                              (or insertText (string-trim-left label))))))
+                  (add-text-properties 0 1 all completion)
+                  (put-text-property 0 1 'eglot--lsp-completion all completion)
+                  completion))
+              items)))))
        :annotation-function
        (lambda (obj)
          (eglot--dbind ((CompletionItem) detail kind insertTextFormat)



reply via email to

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