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

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

[elpa] externals/eglot c65a032 5/8: Close #652: add :company-kind to egl


From: Stefan Monnier
Subject: [elpa] externals/eglot c65a032 5/8: Close #652: add :company-kind to eglot-completion-at-point
Date: Wed, 14 Apr 2021 18:53:08 -0400 (EDT)

branch: externals/eglot
commit c65a032167f42d788e6f48781183820fd88a69f2
Author: Mohsin Kaleem <mohkale@kisara.moe>
Commit: Mohsin Kaleem <mohkale@kisara.moe>

    Close #652: add :company-kind to eglot-completion-at-point
    
    * eglot.el (eglot-completion-at-point): Add a :company-kind field to the
    completion-at-point function so that company can associate completion
    candidates with lsp types.
---
 eglot.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eglot.el b/eglot.el
index 5914f2d..579ed27 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2236,6 +2236,13 @@ is not active."
                (concat " "
                        (propertize annotation
                                    'face 'font-lock-function-name-face))))))
+       :company-kind
+       ;; Associate each lsp-item with a lsp-kind symbol.
+       (lambda (proxy)
+         (when-let* ((lsp-item (get-text-property 0 'eglot--lsp-item proxy))
+                     (kind (alist-get (plist-get lsp-item :kind)
+                                      eglot--kind-names)))
+           (intern (downcase kind))))
        :company-doc-buffer
        (lambda (proxy)
          (let* ((documentation



reply via email to

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