1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 17:31:44 +03:00

Add command completer for types to declare-option

This commit is contained in:
Delapouite 2017-02-09 10:18:13 +01:00
parent 033ded15ae
commit 0cf94292e4

View File

@ -1317,7 +1317,12 @@ const CommandDesc declare_option_cmd = {
},
CommandFlags::None,
CommandHelper{},
CommandCompleter{},
make_completer(
[](const Context& context, CompletionFlags flags,
const String& prefix, ByteCount cursor_pos) -> Completions {
auto c = {"int", "bool", "str", "regex", "int-list", "str-list", "completions", "line-flags", "range-faces"};
return { 0_byte, cursor_pos, complete(prefix, cursor_pos, c) };
}),
[](const ParametersParser& parser, Context& context, const ShellContext&)
{
Option* opt = nullptr;