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:
parent
248e9a487f
commit
22aeaec399
3 changed files with 107 additions and 48 deletions
|
@ -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))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue