jdtsmith / kind-icon

Completion kind text/icon prefix labelling for emacs in-region completion
GNU Affero General Public License v3.0
174 stars 4 forks source link

Prefix with unknown icon #29

Closed TakingWW closed 1 year ago

TakingWW commented 1 year ago

Unknown icon showing instead of the referred in my config for default kinds.

For python it's type parameter

PythonUnknown

For java it's enum member

JvaUnknown

M-x kind-icon-preview-all output

TypeProof

I tested others icons which is the same as some working ones and i don't remember messing with something like completion kinds, so i think it's default as shows

;; Kind Icon Config

(use-package kind-icon
    :ensure t
    :after corfu
    :custom
    (kind-icon-default-face 'corfu-default)
    (package-selected-packages '(kind-icon corfu))
    (kind-icon-blend-background nil)
    (kind-icon-default-style
        '(:padding -0.5 :stroke 0 :margin 0 :radius 0 :height 0.7 :scale 1))
    :config
    (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))

I don't know whether they are exclusive of these two languages or not, if someone know any language that could have the same behavior pls tell me so i test.

Observations:

jdtsmith commented 1 year ago

What is the source of these completions?

These two kinds have been problematic. My suspicion is that the kind being provided by your completion system is incorrect. The relevant kinds are enummember, and typeparameter (all one word). I've seen packages use enum-member instead, for example. Company for example specifies the versions with dashes. But eglot and lsp-mode both provides the versions without dashes, since that's what the lsp protocol itself specifies.

TakingWW commented 1 year ago

What is the source of these completions?

I'm with corfu and lsp-mode

For note lsp-mode includes dash as words separator (type-parameter and enum-member) and changing the source solved, more specifically lsp-completion.el which list every possible kind in lsp-completion--kind->symbol

Thanks for the help, appreciate.

jdtsmith commented 1 year ago

Thanks for verifying. Sorting it out with the company and lsp-mode maintainers.