[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kind-icon b206898fb0: README: update company config
From: |
ELPA Syncer |
Subject: |
[elpa] externals/kind-icon b206898fb0: README: update company config |
Date: |
Wed, 17 Jul 2024 15:58:24 -0400 (EDT) |
branch: externals/kind-icon
commit b206898fb004bb0f3e0e3bbb9bd630342770db7d
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
README: update company config
---
README.md | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 0c47fdc3b6..f273965b39 100644
--- a/README.md
+++ b/README.md
@@ -72,12 +72,15 @@ for whichever `completion-ui` you are using. Note that for
this method to work,
[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:
```elisp
-(defvar my-company-kind-icon-formatter
- (let ((kind-func (lambda (cand) (company-call-backend 'kind cand))))
- (kind-icon-margin-formatter `((company-kind . ,kind-func)))))
-(defun my-company-kind-icon-margin (cand _selected)
- (funcall my-company-kind-icon-formatter cand))
-(setq company-format-margin-function #'my-company-kind-icon-margin)
+(use-package kind-icon
+ :ensure t
+ :after company
+ :config
+ (let* ((kind-func (lambda (cand) (company-call-backend 'kind cand)))
+ (formatter (kind-icon-margin-formatter `((company-kind .
,kind-func)))))
+ (defun my-company-kind-icon-margin (cand _selected)
+ (funcall formatter cand))
+ (setq company-format-margin-function #'my-company-kind-icon-margin)))
```
## Configuration
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/kind-icon b206898fb0: README: update company config,
ELPA Syncer <=