[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kind-icon dce91ac 49/51: Update README.md
From: |
ELPA Syncer |
Subject: |
[elpa] externals/kind-icon dce91ac 49/51: Update README.md |
Date: |
Wed, 17 Nov 2021 15:57:48 -0500 (EST) |
branch: externals/kind-icon
commit dce91ac4cc22749d42bac554792cf21d4a0ef7a3
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Update README.md
---
README.md | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index bd87d91..1381850 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# kind-icon — colorful icons for completion in Emacs
-This emacs package adds icon or text-based completion prefixes based on the
`:company-kind` property many completion backends (such as lsp-mode) provide.
It works either as a "margin-formatter" (for supporting UI's such as corfu) or
by wrapping the completion function for other completion UI's which can handle
the Emacs 28+ `affixation-function` completion property.
+This emacs package adds configurable icon or text-based completion prefixes
based on the `:company-kind` property that many completion backends (such as
lsp-mode and Emacs 28's elisp-mode) provide.
## Examples
@@ -15,26 +15,27 @@ A few examples of `kind-icon` in action with
[lsp-mode](https://github.com/emacs
|

|

|
</div>
-
## Installation
-Get it from your local package archive (TBD). Note that icons support
requires [svg-lib](https://github.com/rougier/svg-lib). At present `kind-icon`
has been tested extensively with the excellent
[corfu](https://github.com/minad/corfu) completion package (from the maker of
vertico, consult, marginalia, and more).
+Get it from your local package archive (TBD). Note that icon support requires
[svg-lib](https://github.com/rougier/svg-lib). At present `kind-icon` has been
tested extensively with the excellent [corfu](https://github.com/minad/corfu)
completion front-end (from the maker of vertico, consult, marginalia, and
more).
-### Using margin-formatters:
+kind-icon works either as a "margin-formatter" (for supporting UI's such as
corfu) or by wrapping the completion function, for other completion UI's which
can handle the Emacs 28+
[`affixation-function`](https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/minibuf.texi?id=d8e037eeaa7eef26349bc0fb3fa00e10a5c4b894#n1819)
completion property.
-To enable for the completion UI [corfu](https://github.com/minad/corfu), which
has margin-formatters capability:
+### Using margin-formatters (preferred):
+
+To enable for completion UI's with margin-formatters capability such as
[corfu](https://github.com/minad/corfu):
```elisp
(use-package kind-icon ;package availability TBD
:ensure t
:after corfu
:custom
- (kind-icon-default-face 'corfu-background)
+ (kind-icon-default-face 'corfu-background) ; to compute blended background
correctly
:config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
```
-### Wrapping completion-in-region
+### Wrapping completion-in-region:
The more generic approach of wrapping the `completion-in-region-function`
would look like:
@@ -49,15 +50,15 @@ The more generic approach of wrapping the
`completion-in-region-function` would
completion-in-region-function)))))
```
-for whichever `completion-ui` you are using. Note that your completion UI
must support the Emacs 28 `affixation-function' property.
+for whichever `completion-ui` you are using. Note that for this method to
work, your completion UI must support the Emacs 28 `affixation-function`
property.
## Configuration
-The configuration defaults should work fine, but kind-icon can be customized
to change the colors, preference of icons vs. short-text (or mixed) prefixes,
and more.
+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.
### Variables
-`kind-icon` has a few customization variables that allow you to configure its
appearance. The easiest way to edit them is `M-x customize-group kind-icon`,
which automatically takes care of cleaning the cache. If you change them
directly from lisp during a session (e.g. with `setq`), call `M-x
kind-icon-reset-cache` to reset the temporary `kind-icon` cache, so that the
changes will take effect.
+`kind-icon` has a few customization variables that allow you to configure its
appearance. The easiest way to edit them is `M-x customize-group kind-icon`,
which automatically takes care of cleaning the cache upon changes. If you
change them directly from lisp during a session (e.g. with `setq`), call `M-x
kind-icon-reset-cache` to reset the temporary `kind-icon` cache, so that the
changes will take effect.
#### Important configuration variables:
@@ -73,27 +74,27 @@ The configuration defaults should work fine, but kind-icon
can be customized to
### Colors
-If you don't like the default colors used to go along with the icons, you can
customize the associated face, choose another pre-existing face, or substitute
your own face. You can also change how the background color is displayed.
+If you don't like the default colors of the icons, you can customize the
associated face, choose another pre-existing face, or substitute your own face.
You can also change how the background color is displayed.
#### Foreground color
-Icon foreground colors are matched in the default mapping to the face colors
used by font-lock in programming modes (variables, function names, etc.). This
gives consistency with in-buffer highlighting. These colors are taken from the
`:face` mapping's `:foreground` color. If no `:face` is set, the foreground is
taken from `kind-icon-default-face` foreground, or, as a backup, the default
frame foreground.
+Icon foreground colors are matched in the default mapping to the face colors
used by font-lock in programming modes (variables, function names, etc.). This
gives consistency with in-buffer highlighting. These colors are taken from the
`:face` `:foreground` color in `kind-icon-mapping`. If no `:face` is set for
some kind, the foreground is taken from `kind-icon-default-face` foreground,
or, as a backup, the default frame foreground.
#### Background color
-By default, `kind-icon` creates a _blended_ background color that is a mix of
a bit of the foreground color and the normal completion background. Note that
if your completion UI uses a different background color from your normal
buffer, you should configure the face it uses in `kind-icon-default-face`. If
you turn off `kind-icon-blend-background`, `kind-icon` will use both the
foreground _and_ (if set) background from the configured `:face` for each kind,
allowing you to configure arbit [...]
+By default, `kind-icon` creates a _blended_ background color that is a mix of
a bit of the foreground color and the normal completion background (control the
mix with `kind-icon-blend-frac`). Note that if your completion UI uses a
different background color from your normal buffer, you should configure the
face it uses in `kind-icon-default-face`. If you disable
`kind-icon-blend-background`, `kind-icon` will use both the foreground _and_
(if set) background from the configured `:face` f [...]
### Icons
Check the [material icon library](https://materialdesignicons.com) for the
icons you can use, more than 6,500 of them! All you need to "use" an icon is
its name. The easiest approach is to `M-x customize-variable
kind-icon-mapping`, find the kind you are interested in, and change its icon.
Hit the `Preview` button and check the message buffer to confirm it's the icon
you were after, and Apply your changes.
-**Note that `svg-lib`, which `kind-icon` uses, downloads and caches icons, by
default in `.emacs.d/.cache/svg-lib/`.** If no network connection is present,
and the icon has not been cached on disk, the short-text is used as a backup.
+**Note that `svg-lib`, which `kind-icon` uses, downloads and caches icons, by
default in `.emacs.d/.cache/svg-lib/`.** If no network connection is present,
and the icon has not been cached on disk, the short-text is used as a backup
for that session.
And yes, you can use **any icons**!

-### Old School: Text-based Icons!
+### Old School: Text-based Icons
You can also use simple text-based prefixes instead of icons. The icons are
quite lightweight so there shouldn't be much performance difference, but some
may prefer a simpler look. A "text" icon is composed of either one or two
characters (anything longer will be trimmed). Simply set the
`kind-icon-use-icons` variable to `nil` and (if desired) customize the
"Short-Text" in the mapping. Note that if you are not connected to the
network, even if you have enabled icons, any icons which [...]
- [elpa] externals/kind-icon 94ff0ac 13/51: customize interface for mappings, (continued)
- [elpa] externals/kind-icon 94ff0ac 13/51: customize interface for mappings, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon cfa3d73 38/51: Guard against network or other icon retrieval issues (text fallback), ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon ba0f94e 17/51: Re-enable mapping customization preview button, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 0921fe2 35/51: Separate kind-icon--cache, and return ?? when kind missing, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 0d92763 31/51: add kinds constructor, event, reference, typeparameter, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon c69da89 18/51: Updated docs, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 962c209 20/51: Add custom variable watcher for instant updates, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon c0d50c6 40/51: minor reformat, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon be77196 19/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon ea06e81 47/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon dce91ac 49/51: Update README.md,
ELPA Syncer <=
- [elpa] externals/kind-icon 4896e1e 32/51: Switch module & ruler icons, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 21a2861 34/51: Require svg-lib, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 12aa1a9 42/51: Mention how to clear cache, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 8087c8e 44/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon ba37562 09/51: more docs, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon f080f3d 15/51: Remove minor mode in favor of c-in-r-f wrapper function, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon b88965b 28/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon ab3c6d5 24/51: Expand material icon description and mention text-based icons, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 5bf075d 16/51: Add some two character short-text codes, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon e4d941b 45/51: Update README.md, ELPA Syncer, 2021/11/17