diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-10-27 19:49:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-27 19:49:30 +0100 |
commit | e085cacba4e98e476da157616591c24d97b402c7 (patch) | |
tree | 10d21767661d455e18a434c56714f745d8262b7f /runtime | |
parent | 479c01412242c11eab8bdbe62048b1351731bea2 (diff) | |
parent | 8ee7c94a92598d46b488b7fe3b1a5cff6b1bf94a (diff) | |
download | rneovim-e085cacba4e98e476da157616591c24d97b402c7.tar.gz rneovim-e085cacba4e98e476da157616591c24d97b402c7.tar.bz2 rneovim-e085cacba4e98e476da157616591c24d97b402c7.zip |
Merge pull request #11302 from bfredl/luacall
lua: add vim.fn.{func} for direct access to vimL function
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/if_lua.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index 8528085f47..d527a91a93 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -588,6 +588,22 @@ vim.schedule({callback}) *vim.schedule()* Schedules {callback} to be invoked soon by the main event-loop. Useful to avoid |textlock| or other temporary restrictions. +vim.fn.{func}({...}) + Call vimL function {func} with arguments. {func} can be both builtin + functions and user functions. To call autoload functions, use the + syntax `vim.fn['some#function']({...})` + + Note: unlike vim.api.|nvim_call_function| this converts values directly + between vimL values and lua values. If the vimL function returns a + float, it will be representeted directly as a lua number. Both empty + lists and dictonaries will be represented by an empty table. + + Note: vim.fn keys are generated on demand. So `pairs(vim.fn)` + does NOT work to enumerate all functions. + +vim.call({func}, {...}) + Call vim script function {func}. Equivalent to `vim.fn[func]({...})` + vim.type_idx *vim.type_idx* Type index for use in |lua-special-tbl|. Specifying one of the values from |vim.types| allows typing the empty table (it is |