update packages
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
This is company.info, produced by makeinfo version 6.8 from
|
||||
company.texi.
|
||||
|
||||
This user manual is for Company version 0.10.0 (16 April 2023).
|
||||
This user manual is for Company version 1.0.3-snapshot
|
||||
(7 December 2024).
|
||||
|
||||
Copyright © 2021-2023 Free Software Foundation, Inc.
|
||||
Copyright © 2021-2024 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation License,
|
||||
@@ -26,9 +27,10 @@ The goal of this document is to lay out the foundational knowledge of
|
||||
the package, so that the readers of the manual could competently start
|
||||
adapting Company to their needs and preferences.
|
||||
|
||||
This user manual is for Company version 0.10.0 (16 April 2023).
|
||||
This user manual is for Company version 1.0.3-snapshot
|
||||
(7 December 2024).
|
||||
|
||||
Copyright © 2021-2023 Free Software Foundation, Inc.
|
||||
Copyright © 2021-2024 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation License,
|
||||
@@ -104,7 +106,7 @@ File: company.info, Node: Terminology, Next: Structure, Up: Overview
|
||||
1.1 Terminology
|
||||
===============
|
||||
|
||||
“Completion” is an act of intelligibly guessing possible variants of
|
||||
“Completion” is an act of intelligently guessing possible variants of
|
||||
words based on already typed characters. To “complete” a word means to
|
||||
insert a correctly guessed variant into the buffer.
|
||||
|
||||
@@ -112,20 +114,19 @@ Consequently, the “candidates” are the aforementioned guessed variants
|
||||
of words. Each of the candidates has the potential to be chosen for
|
||||
successful completion. And each of the candidates contains the
|
||||
initially typed characters: either only at the beginning (so-called
|
||||
“prefix matches”), or also inside (“non-prefix matches”) of a candidate
|
||||
(1).
|
||||
“prefix matches”), or also inside of a candidate (“non-prefix matches”).
|
||||
Which matching method is used, depends on the current _backend_ (*note
|
||||
Structure::). ‘company-capf’ is an example of a backend that supports a
|
||||
number of particular non-prefix matching algorithms which are
|
||||
configurable through the user option ‘completion-styles’, which see.
|
||||
For illustrations on how Company visualizes the matches, *note
|
||||
Frontends::.
|
||||
|
||||
The package’s name “Company” is based on the combination of the two
|
||||
The package’s name ‘Company’ is based on the combination of the two
|
||||
words: ‘Complete’ and ‘Anything’. These words reflect the package’s
|
||||
commitment to handling completion candidates and its extensible nature
|
||||
allowing it to cover a wide range of usage scenarios.
|
||||
|
||||
---------- Footnotes ----------
|
||||
|
||||
(1) A good starting point to learn about types of matches is to play
|
||||
with the Emacs’s user option ‘completion-styles’. For illustrations on
|
||||
how Company visualizes the matches, *note Frontends::.
|
||||
|
||||
|
||||
File: company.info, Node: Structure, Prev: Terminology, Up: Overview
|
||||
|
||||
@@ -137,11 +138,11 @@ are pluggable modules: backends (*note Backends::) and frontends (*note
|
||||
Frontends::).
|
||||
|
||||
The “backends” are responsible for retrieving completion candidates;
|
||||
which are then outputted by the “frontends”. For an easy and quick
|
||||
which are then displayed by the “frontends”. For an easy and quick
|
||||
initial setup, Company is supplied with the preconfigured sets of the
|
||||
backends and frontends. The default behavior of the modules can be
|
||||
adjusted per particular needs, goals, and preferences. It is also
|
||||
typical to utilize backends from a variety of third-party libraries
|
||||
adjusted for particular needs, and preferences. It is also typical to
|
||||
utilize backends from a variety of third-party libraries
|
||||
(https://github.com/company-mode/company-mode/wiki/Third-Party-Packages),
|
||||
developed to be pluggable with Company.
|
||||
|
||||
@@ -149,7 +150,7 @@ But Company consists not only of the backends and frontends.
|
||||
|
||||
A core of the package plays the role of a controller, connecting the
|
||||
modules, making them work together; and exposing configurations and
|
||||
commands for a user to operate with. For more details, *note
|
||||
commands for the user to operate with. For more details, *note
|
||||
Customization:: and *note Commands::.
|
||||
|
||||
Also, Company is bundled with an alternative workflow configuration
|
||||
@@ -202,7 +203,7 @@ indicator ‘company’.
|
||||
|
||||
After _company-mode_ had been enabled, the package auto-starts
|
||||
suggesting completion candidates. The candidates are retrieved and
|
||||
shown according to the typed characters and the default (until a user
|
||||
shown according to the typed characters and the default (until the user
|
||||
specifies otherwise) configurations.
|
||||
|
||||
To have Company always enabled for the following sessions, add the line
|
||||
@@ -216,7 +217,7 @@ File: company.info, Node: Usage Basics, Next: Commands, Prev: Initial Setup,
|
||||
================
|
||||
|
||||
By default — having _company-mode_ enabled (*note Initial Setup::) — a
|
||||
tooltip with completion candidates is shown when a user types in a few
|
||||
tooltip with completion candidates is shown when the user types a few
|
||||
characters.
|
||||
|
||||
To initiate completion manually, use the command ‘M-x company-complete’.
|
||||
@@ -226,8 +227,11 @@ respectively key bindings ‘C-n’ and ‘C-p’, then do one of the following:
|
||||
|
||||
• Hit <RET> to choose a selected candidate for completion.
|
||||
|
||||
• Hit <TAB> to complete with the “common part”: characters present at
|
||||
the beginning of all the candidates.
|
||||
• Hit <TAB> to expand the “common part” of all completions. Exactly
|
||||
what that means, can vary by backend. In the simplest case it’s
|
||||
the longest string that all completion start with, but when a
|
||||
backend returns _non-prefix matches_, it can implement the same
|
||||
kind of expansion logic for the input string.
|
||||
|
||||
• Hit ‘C-g’ to stop activity of Company.
|
||||
|
||||
@@ -253,11 +257,15 @@ commands of the out-of-the-box Company.
|
||||
‘RET’
|
||||
‘<return>’
|
||||
Insert the selected candidate (‘company-complete-selection’).
|
||||
Restart completion if a new field is entered.
|
||||
|
||||
‘TAB’
|
||||
‘<tab>’
|
||||
Insert the common part of all the candidates
|
||||
(‘company-complete-common’).
|
||||
Insert the _common part_ of all completion candidates or — if no
|
||||
_common part_ is present — select the next candidate
|
||||
(‘company-complete-common-or-cycle’). In the latter case,
|
||||
wraparound is implicitly enabled (*note
|
||||
company-selection-wrap-around::).
|
||||
|
||||
‘C-g’
|
||||
‘<ESC ESC ESC>’
|
||||
@@ -285,17 +293,8 @@ illustrate how to assign key bindings to such commands.
|
||||
(global-set-key (kbd "<tab>") #'company-indent-or-complete-common)
|
||||
|
||||
(with-eval-after-load 'company
|
||||
(define-key company-active-map (kbd "M-/") #'company-complete))
|
||||
|
||||
(with-eval-after-load 'company
|
||||
(define-key company-active-map
|
||||
(kbd "TAB")
|
||||
#'company-complete-common-or-cycle)
|
||||
(define-key company-active-map
|
||||
(kbd "<backtab>")
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(company-complete-common-or-cycle -1))))
|
||||
(define-key company-active-map (kbd "M-/") #'company-complete)
|
||||
(define-key company-active-map (kbd "C-M-/") #'company-complete-common))
|
||||
|
||||
In the same manner, an additional key can be assigned to a command or a
|
||||
command can be unbound from a key. For instance:
|
||||
@@ -350,7 +349,7 @@ File: company.info, Node: Configuration File, Prev: Customization Interface,
|
||||
======================
|
||||
|
||||
Company is a customization-rich package. This section lists some of the
|
||||
core settings that influence the overall behavior of the _company-mode_.
|
||||
core settings that influence its overall behavior.
|
||||
|
||||
-- User Option: company-minimum-prefix-length
|
||||
This is one of the values (together with ‘company-idle-delay’),
|
||||
@@ -374,6 +373,10 @@ core settings that influence the overall behavior of the _company-mode_.
|
||||
(setq company-idle-delay
|
||||
(lambda () (if (company-in-string-or-comment) nil 0.3)))
|
||||
|
||||
-- User Option: company-inhibit-inside-symbols
|
||||
You can set this option to ‘t’ to disable the auto-start behavior
|
||||
when in the middle of a symbol.
|
||||
|
||||
-- User Option: company-global-modes
|
||||
This option allows to specify in which major modes _company-mode_
|
||||
can be enabled by ‘(global-company-mode)’. *Note Initial Setup::.
|
||||
@@ -398,8 +401,8 @@ core settings that influence the overall behavior of the _company-mode_.
|
||||
To allow typing in characters that don’t match the candidates, set
|
||||
the value of this option to ‘nil’. For an opposite behavior (that
|
||||
is, to disallow non-matching input), set it to ‘t’. By default,
|
||||
Company is configured to require a matching input only if a user
|
||||
manually enables completion or selects a candidate; by having the
|
||||
Company is configured to require a matching input only if the user
|
||||
invokes completion manually or selects a candidate; by having the
|
||||
option configured to call the function ‘company-explicit-action-p’.
|
||||
|
||||
-- User Option: company-lighter-base
|
||||
@@ -575,12 +578,11 @@ user options.
|
||||
| ||||