Improve documentation for completions options

This commit is contained in:
Maxime Coste 2016-08-17 19:52:53 +01:00
parent b9144f151a
commit e0c1f33427
2 changed files with 8 additions and 8 deletions

View File

@ -893,10 +893,10 @@ Some options are built in Kakoune, and can be used to control it's behaviour:
(`word=all`) or only the current one (`word=buffer`)
- `filename` which tries to detect when a filename is being entered and
provides completion based on local filesystem.
- `option=<opt-name>` where <opt-name> is a _str-list_ option. The first
element of the list should follow the format:
_<line>.<column>[+<length>]@<timestamp>_ to define where the completion
apply in the buffer, and the other strings are the candidates.
- `option=<opt-name>` where <opt-name> is a _completions_ option, which is a `:`
separated list of _<text>|<docstring>|<menu text>_ candidates, except for the first
element which follows the _<line>.<column>[+<length>]@<timestamp>_ format to define
where the completion apply in the buffer.
* `static_words` _str-list_: list of words that are always added to completion
candidates when completing words in insert mode.
* `autoreload` _enum(yes|no|ask)_: auto reload the buffers when an external

View File

@ -85,13 +85,13 @@ external completions are provided using an option to store completion, which
have the following format.
----
line.column[+len]@timestamp:candidate1[|desc1[|menu1]]:candidate2[|desc2[|menu2]]:...
line.column[+len]@timestamp:candidate1|desc1|menu1:candidate2|desc2|menu2:...
----
the first element of this string list specify where and when this completions
applies, the others are simply completion candidates, eventually containing
a descriptive text (after an `|` separator), and a separate menu text (after
the second `|` separator).
applies, the others are a triplet `<completion text>|<docstring>|<menu text>`
The menu text is a a markup string, so it can contain `{face}` directives.
to effectively use that completion option, it should get added to the completers
option.