provider: Add support for python commands/functions

This uses the provider/scripting infrastructure to reintroduce python support
through the msgpack-rpc API.

A new 'initpython' option was added, and it must be set to a command that will
bootstrap the python provider the first time it's needed.
This commit is contained in:
Thiago de Arruda
2014-06-26 18:27:01 -03:00
parent 8a091e7f5c
commit 486c8e37c1
8 changed files with 42 additions and 2 deletions

View File

@@ -6457,6 +6457,7 @@ static struct fst {
{"prevnonblank", 1, 1, f_prevnonblank},
{"printf", 2, 19, f_printf},
{"pumvisible", 0, 0, f_pumvisible},
{"pyeval", 1, 1, f_pyeval},
{"range", 1, 3, f_range},
{"readfile", 1, 3, f_readfile},
{"reltime", 0, 2, f_reltime},
@@ -11461,7 +11462,13 @@ static void f_pumvisible(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = 1;
}
/*
* "pyeval()" function
*/
static void f_pyeval(typval_T *argvars, typval_T *rettv)
{
script_host_eval("python_eval", argvars, rettv);
}
/*
* "range()" function