doomemacs/modules/completion/company
Henrik Lissner 09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
..
test Update & fix unit tests 2018-03-02 20:46:45 -05:00
autoload.el completion/company: minor quoting refactor 2018-05-08 17:57:27 +02:00
config.el Major refactor & optimization of how modules load their packages 2018-05-25 00:46:16 +02:00
packages.el completion/company: Emacs version check for company-box #566 2018-05-07 22:38:35 +02:00
README.org Update & reformat module readmes for v2.0.9 2018-01-01 13:21:53 -05:00

:completion company

This module adds code-completion support, powered by company.

  • Uses company-quickhelp for documentation tooltips
  • Uses company-statistics to order results by usage frequency

/screenshots/company.png

Table of Contents   TOC

Install

Some languages require additional setup, and some languages may have no completion support at all.

Check the README.org in that language's module for details.

Configure

Auto-completion

By default, I've disabled auto-completion. This is my preference. I prefer to invoke company when I need it by calling company-complete manually (typically, bound to C-SPC in insert mode). However, some may not share my preference.

To enable auto-completion you must:

  1. Load company,
  2. and change company-idle-delay to a non-nil float (the default is 0.5)

For example:

(require 'company)
(setq company-idle-delay 0.2
      company-minimum-prefix-length 3)

Troubleshooting

If completion isn't working for you, please consider the following before posting a bug report:

  • If what you are expecting is popup-as-you-type completion (which is disabled by default), see the "Configure > Auto-completion" section above, which will instruct you on how to enable this.
  • Some languages don't have any auto-completion support at all.