Replace company-box with kind-icons
Some checks failed
/ Test config on 20 (push) Failing after 49s

It makes icons also appear in the terminal
This commit is contained in:
Maciej 2025-01-07 08:04:41 +02:00
parent d260817105
commit b9559eabe0
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
2 changed files with 177 additions and 165 deletions

File diff suppressed because it is too large Load diff

View file

@ -12,8 +12,16 @@
(unbind-key "C-c & C-v" yas-minor-mode-map)) (unbind-key "C-c & C-v" yas-minor-mode-map))
(use-package yasnippet-snippets :ensure t :after (yasnippet)) (use-package yasnippet-snippets :ensure t :after (yasnippet))
(use-package company-box :ensure t :after (company)
:hook (company-mode . company-box-mode)) (use-package kind-icon
:ensure t
:after company
:config
(let* ((kind-func (lambda (candidate) (company-call-backend 'kind candidate)))
(formatter (kind-icon-margin-formatter `((company-kind . ,kind-func)))))
(defun icejam-company-kind-icon-margin (candidate _selected)
(funcall formatter candidate))
(setopt company-format-margin-function #'icejam-company-kind-icon-margin)))
(with-eval-after-load 'company (with-eval-after-load 'company
(global-company-mode t) (global-company-mode t)
@ -55,12 +63,11 @@
;; Absolute defaults for company mode ;; Absolute defaults for company mode
(setopt company-backends (setopt company-backends
'((company-files ; files & directory '((company-files ; files & directory
company-keywords ; keywords company-keywords ; keywords
company-capf company-capf)
) (company-dabbrev company-abbrev)
(company-dabbrev company-abbrev) ))
))
;; Use standard emacs next and previous bindings for navigating company ;; Use standard emacs next and previous bindings for navigating company
;; suggestions ;; suggestions