completion/company: add company-box config & +childframe flag

This commit is contained in:
Henrik Lissner 2018-04-22 23:41:53 -04:00
parent 6bdaf2afbb
commit 97812583f0
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 18 additions and 25 deletions

View file

@ -50,18 +50,28 @@ MODES should be one major-mode symbol or a list of them."
(def-package! company-statistics
:after company
:config
(setq company-statistics-file (concat doom-cache-dir "company-stats-cache.el"))
(quiet! (company-statistics-mode +1)))
:hook (company-mode . company-statistics-mode)
:config (setq company-statistics-file (concat doom-cache-dir "company-stats-cache.el")))
;; Looks ugly on OSX without emacs-mac build
(def-package! company-quickhelp
:after company
:unless (and EMACS26+ (featurep! +childframe))
:hook (company-mode . company-quickhelp-mode)
:config (setq company-quickhelp-delay nil))
(def-package! company-box
:when (and EMACS26+ (featurep! +childframe))
:hook (company-mode . company-box-mode)
:config
(setq company-quickhelp-delay nil)
(company-quickhelp-mode +1))
(setq company-box-backends-colors nil
company-box-icons-elisp
(list (concat (all-the-icons-material "functions") " ")
(concat (all-the-icons-material "check_circle") " ")
(concat (all-the-icons-material "stars") " ")
(concat (all-the-icons-material "format_paint") " "))
company-box-icons-unknown (concat (all-the-icons-material "find_in_page") " ")
company-box-icons-yasnippet (concat (all-the-icons-material "short_text") " ")))
(def-package! company-dict

View file

@ -7,21 +7,6 @@
(add-hook 'doom-escape-hook #'+posframe|delete-on-escape))
(def-package! company-box
:when EMACS26+
:hook (company-mode . company-box-mode)
:config
(setq company-frontends (delq 'company-pseudo-tooltip-frontend company-frontends)
company-box-icons-elisp
(list (concat (all-the-icons-material "functions") " ")
(concat (all-the-icons-material "check_circle") " ")
(concat (all-the-icons-material "stars") " ")
(concat (all-the-icons-material "format_paint") " "))
company-box-icons-unknown (concat (all-the-icons-material "find_in_page") " ")
company-box-backends-colors nil
company-box-icons-yasnippet (concat (all-the-icons-material "short_text") " ")))
(def-package! ivy-posframe
:when EMACS26+
:hook (ivy-mode . ivy-posframe-enable)

View file

@ -2,7 +2,5 @@
;;; ui/posframe/packages.el
(when EMACS26+
(when (featurep! :completion company)
(package! company-box))
(when (featurep! :completion ivy)
(package! ivy-posframe)))