diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-26 18:27:01 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 11:37:41 -0300 |
commit | 486c8e37c17e4aa89fa9ef7e0c682b659a5a8a82 (patch) | |
tree | 08768b45ebf42eb2c0594cc3d506672213eb3201 /src/nvim/eval.c | |
parent | 8a091e7f5c58a27fb3af1de76284430e812c95b5 (diff) | |
download | rneovim-486c8e37c17e4aa89fa9ef7e0c682b659a5a8a82.tar.gz rneovim-486c8e37c17e4aa89fa9ef7e0c682b659a5a8a82.tar.bz2 rneovim-486c8e37c17e4aa89fa9ef7e0c682b659a5a8a82.zip |
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.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 8eb4fa90d6..e72dd60dcf 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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 |