mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Refactor how company-backends are set and stored
Company backends are now built from an alist (+company-backend-alist), which can be manipulated through set-company-backend!. Backends can now be set to all children of a parent mode (text-mode, prog-mode, etc), like so: (set-company-backend! :derived 'text-mode 'company-dabbrev) or only for an exact major-mode: (set-company-backend! 'markdown-mode 'company-dabbrev-code) Backends cascade. So combining the two examples above will cause company-backends in a markdown-buffer (which is derived from text-mode) to be (company-dabbrev-code company-dabbrev).
This commit is contained in:
@ -15,10 +15,9 @@
|
||||
company-frontends
|
||||
'(company-pseudo-tooltip-frontend
|
||||
company-echo-metadata-frontend)
|
||||
company-backends
|
||||
'((:separate company-capf company-yasnippet))
|
||||
company-transformers '(company-sort-by-occurrence))
|
||||
:config
|
||||
(add-hook 'company-mode-hook #'+company|init-backends)
|
||||
(global-company-mode +1))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user