branch: externals/eglot commit c65a032167f42d788e6f48781183820fd88a69f2 Author: Mohsin Kaleem <mohk...@kisara.moe> Commit: Mohsin Kaleem <mohk...@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