]> git.eshelyaron.com Git - emacs.git/commitdiff
(eglot-completion-at-point): Return correct values in :company-kind
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 6 Feb 2023 22:28:25 +0000 (00:28 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 6 Feb 2023 22:28:25 +0000 (00:28 +0200)
* lisp/progmodes/eglot.el (eglot-completion-at-point): Return the
correct values in :company-kind for "EnumMember" and "TypeParameter".
The convention is to use kebab case rather than plain downcasing.
Reported in https://github.com/company-mode/company-mode/issues/1370.

lisp/progmodes/eglot.el

index 3fc1d68422a6adc430db2e7847a0c758d2983e06..c906890c949fbcd55477682e440529e9efc9a693 100644 (file)
@@ -2873,7 +2873,10 @@ for which LSP on-type-formatting should be requested."
          (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))))
+           (pcase kind
+             ("EnumMember" 'enum-member)
+             ("TypeParameter" 'type-parameter)
+             (_ (intern (downcase kind))))))
        :company-deprecated
        (lambda (proxy)
          (when-let ((lsp-item (get-text-property 0 'eglot--lsp-item proxy)))