From e0c1f33427623d7912a5aae33b1cf5694885fb6b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 17 Aug 2016 19:52:53 +0100 Subject: [PATCH] Improve documentation for completions options --- README.asciidoc | 8 ++++---- doc/interfacing.asciidoc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 4452fb00..94280239 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -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=` where is a _str-list_ option. The first - element of the list should follow the format: - _.[+]@_ to define where the completion - apply in the buffer, and the other strings are the candidates. + - `option=` where is a _completions_ option, which is a `:` + separated list of _||_ candidates, except for the first + element which follows the _.[+]@_ 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 diff --git a/doc/interfacing.asciidoc b/doc/interfacing.asciidoc index 8efe75e6..f896b175 100644 --- a/doc/interfacing.asciidoc +++ b/doc/interfacing.asciidoc @@ -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 `||` + +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.