diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2023-02-07 00:28:25 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2023-02-07 00:28:25 +0200 |
commit | 2ac8c4bbd6f47751a68b0230310f6fddd7da8de5 (patch) | |
tree | ac6ffe14b4377c30f8af3151a3cef7e77501307d | |
parent | 321cbd9a6014bf0b70dc0b01aed27f36aec4051d (diff) | |
download | emacs-2ac8c4bbd6f47751a68b0230310f6fddd7da8de5.tar.gz emacs-2ac8c4bbd6f47751a68b0230310f6fddd7da8de5.tar.bz2 emacs-2ac8c4bbd6f47751a68b0230310f6fddd7da8de5.zip |
(eglot-completion-at-point): Return correct values in :company-kind
* 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.
-rw-r--r-- | lisp/progmodes/eglot.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 3fc1d68422a..c906890c949 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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))) |