This package let you build your own candidate list manually
(therefore company-manually
), which is used for company-mode. For
example, when writing Tex
document, I can use command
company-manually-add-candidate-at-point
or
company-manually-add-candidate-ivy
to manually add x_{a}
and
x_{b}
to company-manually--candidates
. Then if I insert x
,
company backend company-manually
will display x_{a}
and x_{b}
as candidates to let me choose among them.
(use-package
:load-path "path/to/company-manually.el")
You would better set company-minimum-prefix-length
to 1, if you
are using cdlatex and the prefixes of some of you candidates
consist of one letter and _
or ^
, for example x_{a}
.
The season is that by default if you enable cdlatex
, when you
enter _
or ^
, cdlatex
will automatically add {}
. This
feature will get rid of candidates which have similar prefix as we
pointed out previously. In order to bypass this, we advice
cdlatex-sub-superscript
so if company tooltip
or company
posframe
are visible, cdlatex will not insert {}
. In addition,
company tooltip
or company posframe
will only display if
number of inserted letters is bigger than
company-minimum-prefix-length
and there are
candidates. Therefore, setting company-minimum-prefix-length
to
1 is preferable.
company-manually-add-candidate-at-point
: first mark the region you would like to be candidate, then execute this command.company-manually-add-candidate-ivy
: execute this command, then input the candidate.
company-manually-delete-candidate-at-point
: first mark the region you would like to be deleted from candidates, then execute this command.company-manually-add-candidate-ivy
: execute this command, then input the candidate you would like to delete.
company-manually-cleanup-candidates
: cleanup all candidates.
company-manually-restore
: whether save and restore the candidates (defaultt
).company-manually-file
: default file for saving/loading company-manually candidates (default(concat user-emacs-directory ".company-manually.el")
).