Commit Graph

9 Commits

Author SHA1 Message Date
281ea56643 completion/company: refactor backend resolution
Makes it easier to change company-backends retrospectively (with a hook
or setq-hook!). Also simplifies how backend defaults are stored (no more
of this :derived and :exact business).

Also updates unit tests.
2019-06-29 01:39:23 +02:00
533cb13a02 Append default backends to buffer-local backends 2018-07-30 12:57:26 +02:00
22aeaec399 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).
2018-07-30 03:43:42 +02:00
898449e374 Add completion/company tests 2018-06-20 19:09:05 +02:00
eaca8c58fa Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
57efa1b864 Update & fix unit tests 2018-03-02 20:46:45 -05:00
8ad2666f8f Refactor and fix unit tests, plus isolate them better 2017-12-31 14:58:45 -05:00
ea7f0ddcc3 Add no-byte-compile to completion/company unit test file 2017-11-09 00:34:32 +01:00
0b3db8fcdd Add completion/company test 2017-06-28 23:36:18 +02:00