branch: externals/kind-icon commit 556b0fb92aac24979b2c501431c7d48f75a5169f Merge: b206898fb0 9f6e04a905 Author: JD Smith <93749+jdtsm...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
Merge pull request #45 from chookity-pokk/update-company-readme Update README.md with company compatibility --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f273965b39..dcda7b18b0 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ for whichever `completion-ui` you are using. Note that for this method to work, ### Using with company -[Company](https://github.com/company-mode/company-mode) has its own distinct margin formatter system, but `kind-icon` can easily be adapted to it as follows: +[Company](https://github.com/company-mode/company-mode) has its own distinct margin formatter system, but `kind-icon` can easily be adapted to it with the following setup: ```elisp (use-package kind-icon @@ -83,6 +83,9 @@ for whichever `completion-ui` you are using. Note that for this method to work, (setq company-format-margin-function #'my-company-kind-icon-margin))) ``` +>[!IMPORTANT] +> The company config above requires you to use lexical binding. Simply add `;;; -*- lexical-binding: t -*-` at the top of your `init.el`. + ## Configuration The configuration defaults should work fine, but `kind-icon` can be customized to change the icons and colors, preference of icons vs. short-text (or mixed) prefixes, and more. See [the wiki](https://github.com/jdtsmith/kind-icon/wiki) for configuration ideas including alternative icon sets.