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

Icons colorization #27

Closed ceed0 closed 1 year ago

ceed0 commented 1 year ago

First, thanks for the great package.

Do you think it would be possible to colorize icons for certain variables with colors associated with them, like on the screenshot from here ss

jdtsmith commented 1 year ago

In principle but where would the information on what “color” a variable is come from? The colors are chosen to replicate font lock colors in the buffer for variables vs functions etc.

ceed0 commented 1 year ago

That would be mode dependant, for emacs itself :foreground/:background values could be used for faces. LSP-servers can send this info through eglot or lsp-mode. But I'm not sure how kind-icon could receive this information.

jdtsmith commented 1 year ago

What would be needed is a backend property like :kind-color or similar that modes provide. Kind-icon doesn't know much about the competitions it is showing other than what it's told. Closing, but if something develops along these lines we can revisit.