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

Autoload kind-icon-margin-formatter and kind-icon-enhance-completion #14

Closed daanturo closed 2 years ago

daanturo commented 2 years ago

Having them autoloaded should be nice.

jdtsmith commented 2 years ago

Can you share how you have configured kind-icon to need these?

daanturo commented 2 years ago

I don't use use-package, currently my config looks like this:

(require 'kind-icon)
(setq kind-icon-default-face 'corfu-default)
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)

Autoloading can free the require call; also it provides a way to check, without loading, if kind-icon is installed (fboundp 'kind-icon...) when the package isn't installed through package.el (no package-installed-p).

In addition, it helps lazy loading: just (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter) can defer loading kind-icon until corfu's completion list appears.

jdtsmith commented 2 years ago

Added in 03a4082. Can you check that they are working with your config?

daanturo commented 2 years ago

Thank you for this!