company 
- Description
- Modular text completion framework
- Latest
- company-1.0.2.0.20251021.221153.tar (.sig), 2025-Oct-22, 2.64 MiB
- Maintainer
- Dmitry Gutov <dmitry@gutov.dev>
- Website
- http://company-mode.github.io/
- Browse ELPA's repository
- CGit or Gitweb
- Badge
- Manual
- company
To install this package from Emacs, use package-install or list-packages.
Full description
Company is a modular completion framework. Modules for retrieving completion
candidates are called backends, modules for displaying them are frontends.
Company comes with many backends, e.g. `company-etags'. These are
distributed in separate files and can be used individually.
Enable `company-mode' in all buffers with M-x global-company-mode. For
further information look at the documentation for `company-mode' (C-h f
company-mode RET).
If you want to start a specific backend, call it interactively or use
`company-begin-backend'. For example:
M-x company-abbrev will prompt for and insert an abbrev.
To write your own backend, look at the documentation for `company-backends'.
Here is a simple example completing "foo":
(defun company-my-backend (command &optional arg &rest ignored)
(interactive (list 'interactive))
(pcase command
(`interactive (company-begin-backend 'company-my-backend))
(`prefix (company-grab-symbol))
(`candidates (list "foobar" "foobaz" "foobarbaz"))
(`meta (format "This value is named %s" arg))))
Sometimes it is a good idea to mix several backends together, for example to
enrich gtags with dabbrev-code results (to emulate local variables). To do
this, add a list with both backends as an element in `company-backends'.
Old versions
| company-1.0.2.0.20250911.12909.tar.lz | 2025-Sep-11 | 2.04 MiB |
| company-1.0.2.0.20250910.23023.tar.lz | 2025-Sep-10 | 2.04 MiB |
| company-1.0.2.0.20250805.152556.tar.lz | 2025-Aug-05 | 2.04 MiB |
| company-1.0.2.0.20250228.25856.tar.lz | 2025-Feb-28 | 2.04 MiB |
| company-1.0.2.0.20241227.162935.tar.lz | 2024-Dec-27 | 2.04 MiB |
| company-1.0.2.0.20240926.212727.tar.lz | 2024-Sep-27 | 2.04 MiB |
| company-1.0.1.0.20240921.215325.tar.lz | 2024-Sep-22 | 2.04 MiB |
| company-1.0.0.0.20240921.5345.tar.lz | 2024-Sep-21 | 2.04 MiB |
| company-0.10.2.0.20240911.20707.tar.lz | 2024-Sep-12 | 2.04 MiB |
| company-0.9.13.0.20230926.3256.tar.lz | 2023-Sep-30 | 2.03 MiB |
News
History of user-visible changes
Next
- The minimum required version of Emacs is now 26.1.
TABbinding changed tocompany-complete-common-or-cycle, andbacktabbinding tocompany-cycle-backward(#1499).- Completion is restarted if it enters a new "field" at the end, as indicated by
the
adjust-boundariesbackend action (#1497). This benefits file name (and directory) completion. The user optioncompany-files-chop-trailing-slashhas been removed, and thepost-completionhandler incompany-fileshas been removed as well. - Handle the case when the current c-a-p-f function changes mid-session (#1494).
2024-09-23 (1.0.2)
- More reliable cache expiration (at the beginning of completion).
2024-09-21 (1.0.1)
- Fix for failover from a backend group to the next backend.
2024-09-21 (1.0.0)
company-complete-commonnow performs generalized expand common part completion when the backend supports that. In particular, forcompletion-at-point-functionsit queriescompletion-try-completion.company-dabbrev-codeandcompany-etagsalso do that whencompletion-stylessupport is enabled.company-dabbrev-other-buffersandcompany-dabbrev-code-other-bufferscan now take a function as its value (#1485)- Completion works in the middle of a symbol (#1474).
- New user option
company-inhibit-inside-symbols. Set it totto switch closer to the previous behavior. - Improved behavior when user types new character while completion is being
computed: better performance, less blinking (in the rare cases when it still
happened). This affects native async backends and is opt-in with
company-capf. - For that,
company-capfsupports interrupting computation on new user input. Completion functions that want to take advantage of this behavior should include:company-use-while-no-input tin the returned properties. company-elisphas been removed. It's not needed since Emacs 24.4, with all of its features having been incorporated into the built-in Elisp completion.company-filesshows shorter completions. Previously, the popup spanned the whole absolute file name being completed, and now it starts after the nearest directory separator (#1040).- New user option
company-capf-disabled-functions(#1437). - Better support for
yas-key-syntaxes(#1268). - New user option
company-tooltip-scrollbar-widthwith default 0.4. - The tooltip uses a more complex rendering approach, supporting double
width/CJK characters, as well as buffer text of different sizes
(#1394).
variable-pitch-modeis also working better, although when using it it's recommended to customize thecompany-tooltipface to be monospaced. - New user option
company-dabbrev-code-completion-styles. Use it to enable fuzzy matching incompany-dabbrev-code(#1215). An example configuration one can try:
(setq company-dabbrev-code-ignore-case t
company-dabbrev-code-completion-styles '(basic flex))
New user option
company-etags-completion-styles, to be used the same way.The backend command
keep-prefixis being phased out. The built-in backends implement it internally now, which resolved a number of sharp edges (mostly) around "grouped" backends. To make that easier, several helpers were added, such ascompany-cache-fetchandcompany-substitute-prefix... ...