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

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

[elpa] externals/elpa e7a43e2 40/71: Fix #480: also consider label of a


From: João Távora
Subject: [elpa] externals/elpa e7a43e2 40/71: Fix #480: also consider label of a CompletionItem for snippets
Date: Wed, 16 Dec 2020 11:42:22 -0500 (EST)

branch: externals/elpa
commit e7a43e28eddef3e923942699bb30b7bc7e1480fc
Author: Gary Oberbrunner <garyo@oberbrunner.com>
Commit: João Távora <joaotavora@gmail.com>

    Fix #480: also consider label of a CompletionItem for snippets
    
    Copyright-paperwork-exempt: yes
    
    * eglot.el (eglot-completion-at-point): Consider label when
    expanding snippets.
---
 eglot.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/eglot.el b/eglot.el
index cc60290..fe8eeee 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2152,9 +2152,7 @@ is not active."
        :exit-function
        (lambda (proxy _status)
          (eglot--dbind ((CompletionItem) insertTextFormat
-                        insertText
-                        textEdit
-                        additionalTextEdits)
+                        insertText textEdit additionalTextEdits label)
              (funcall
               resolve-maybe
               (or (get-text-property 0 'eglot--lsp-item proxy)
@@ -2189,7 +2187,7 @@ is not active."
                     ;; whole completion, since `insertText' is the full
                     ;; completion's text.
                     (delete-region (- (point) (length proxy)) (point))
-                    (funcall snippet-fn insertText))))
+                    (funcall snippet-fn (or insertText label)))))
            (eglot--signal-textDocument/didChange)
            (eglot-eldoc-function)))))))
 



reply via email to

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