GNU-devel ELPA - company

company Atom Feed

Description
Modular text completion framework
Latest
company-1.0.2.0.20260604.136.tar (.sig), 2026-Jun-04, 2.67 MiB
Maintainer
Dmitry Gutov <dmitry@gutov.dev>
Website
http://company-mode.github.io/
Browse ELPA's repository
CGit or Gitweb
All Dependencies
posframe (.tar)
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.20260528.101.tar.lz2026-May-282.04 MiB
company-1.0.2.0.20260521.215628.tar.lz2026-May-222.04 MiB
company-1.0.2.0.20260518.234325.tar.lz2026-May-192.04 MiB
company-1.0.2.0.20260424.211153.tar.lz2026-Apr-252.04 MiB
company-1.0.2.0.20251021.221153.tar.lz2025-Oct-222.04 MiB
company-1.0.2.0.20241227.162935.tar.lz2024-Dec-272.04 MiB
company-1.0.1.0.20240921.215325.tar.lz2024-Sep-222.04 MiB
company-1.0.0.0.20240921.5345.tar.lz2024-Sep-212.04 MiB
company-0.10.2.0.20240911.20707.tar.lz2024-Sep-122.04 MiB
company-0.9.13.0.20230926.3256.tar.lz2023-Sep-302.03 MiB

News

History of user-visible changes

Next

  • Default key bindings have been changed, moving company-show-doc-buffer and company-show-location to M-h and M-g (from C-h/<f1> and C-w) (#1537). The previous bindings still work, but show a warning and will be removed after the next release. To undo that change locally, do:
(with-eval-after-load 'company
  (define-key company-active-map (kbd "C-h") #'company-show-doc-buffer)
  (define-key company-active-map (kbd "<f1>") #'company-show-doc-buffer)
  (define-key company-active-map (kbd "C-w") #'company-show-location)
  (define-key company-active-map (kbd "M-h") nil)
  (define-key company-active-map (kbd "M-g") nil))
  • company-search-regexp-function defaults to company-search-words-in-any-order-regexp. Another alternative value for it was also added: company-search-flex-words-in-any-order-regexp, working somewhat similar to the popular completion style Orderless.
  • The search faces in the popup inherit from isearch.
  • New option company-global-minibuffer for completion during eval-expression (M-:). The "pseudo-tooltip" frontend is not supported by this feature, company-childframe is recommended instead.
  • C-M-i is bound to company-complete-common when completion is active.
  • Search mode input is displayed at the bottom of the popup (#1535).
  • New built-in frontend using "real graphical" widget for the popup (#1525). This also adds a hard dependency on the package posframe.
  • The default light theme colors were changed to a more neutral set, and the scroll bar background was removed (#1529).
  • The minimum required version of Emacs is now 26.1.
  • TAB binding changed to company-complete-common-or-cycle, and backtab binding to company-cycle-backward (#1499).
  • Completion is restarted if it enters a new "field" at the end, as indicated by the adjust-boundaries backend action (#1497). This benefits file name (and directory) completion. The user option company-files-chop-trailing-slash has been removed, and the post-completion handler in company-files has 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-common now performs generalized expand common part completion when the backend supports that. In particular, for completion-at-point-functions it queries completion-try-completion. company-dabbrev-code and company-etags also do that when completion-styles support is enabled.
  • company-dabbrev-other-buffers and company-dabbrev-code-other-buffers can 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 to t to 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-capf supports interrupting computation on new user input. Completion functions that want to take advantage of this behavior ... ...