Refactor company defaults
In the interest of performance and reducing things we have to maintain.
This commit is contained in:
parent
94a2ff97d7
commit
8b52e8ca0f
1 changed files with 21 additions and 2 deletions
|
@ -11,9 +11,26 @@
|
||||||
company-require-match 'never
|
company-require-match 'never
|
||||||
company-global-modes
|
company-global-modes
|
||||||
'(not erc-mode message-mode help-mode gud-mode eshell-mode)
|
'(not erc-mode message-mode help-mode gud-mode eshell-mode)
|
||||||
company-backends '(company-capf)
|
|
||||||
company-frontends '(company-pseudo-tooltip-frontend
|
company-frontends '(company-pseudo-tooltip-frontend
|
||||||
company-echo-metadata-frontend))
|
company-echo-metadata-frontend)
|
||||||
|
|
||||||
|
;; Buffer-local backends will be computed when loading a major mode, so
|
||||||
|
;; only specify a global default here.
|
||||||
|
company-backends '(company-capf)
|
||||||
|
|
||||||
|
;; Company overrides `company-active-map' based on
|
||||||
|
;; `company-auto-complete-chars'; no magic please!
|
||||||
|
company-auto-complete-chars nil
|
||||||
|
|
||||||
|
;; Only search the current buffer for `company-dabbrev' (a backend that
|
||||||
|
;; suggests text your open buffers). This prevents Company from causing
|
||||||
|
;; lag once you have a lot of buffers open.
|
||||||
|
company-dabbrev-other-buffers nil
|
||||||
|
;; Make `company-dabbrev' fully case-sensitive, to improve UX with
|
||||||
|
;; domain-specific words with particular casing.
|
||||||
|
company-dabbrev-ignore-case nil
|
||||||
|
company-dabbrev-downcase nil)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(when (featurep! :editor evil)
|
(when (featurep! :editor evil)
|
||||||
(add-hook 'company-mode-hook #'evil-normalize-keymaps)
|
(add-hook 'company-mode-hook #'evil-normalize-keymaps)
|
||||||
|
@ -106,6 +123,8 @@
|
||||||
(ElispFeature . ,(all-the-icons-material "stars" :face 'all-the-icons-orange))
|
(ElispFeature . ,(all-the-icons-material "stars" :face 'all-the-icons-orange))
|
||||||
(ElispFace . ,(all-the-icons-material "format_paint" :face 'all-the-icons-pink)))))
|
(ElispFace . ,(all-the-icons-material "format_paint" :face 'all-the-icons-pink)))))
|
||||||
|
|
||||||
|
(delq! 'company-echo-metadata-frontend company-frontends)
|
||||||
|
|
||||||
(defun +company-box-icons--elisp-fn (candidate)
|
(defun +company-box-icons--elisp-fn (candidate)
|
||||||
(when (derived-mode-p 'emacs-lisp-mode)
|
(when (derived-mode-p 'emacs-lisp-mode)
|
||||||
(let ((sym (intern candidate)))
|
(let ((sym (intern candidate)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue