diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2022-01-04 14:34:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 14:34:42 +0100 |
commit | e79a5889378cbcaf8990ced4b852408284fb7c2a (patch) | |
tree | a48ea400721dcf3d9a61ef73850472a8dfe13aa6 /runtime | |
parent | 207307d0faf9b821cfd3cfeae4d027ab9ee5dbdb (diff) | |
parent | d44254641ffb5c9f185db4082d2bf1f04bf1117e (diff) | |
download | rneovim-e79a5889378cbcaf8990ced4b852408284fb7c2a.tar.gz rneovim-e79a5889378cbcaf8990ced4b852408284fb7c2a.tar.bz2 rneovim-e79a5889378cbcaf8990ced4b852408284fb7c2a.zip |
Merge pull request #16912 from shadmansaleh/enhance/lua_cmd_inspect
feat(lua): make :lua =expr print result of expr
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/lua.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index eaa25f0961..63f142b789 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -249,13 +249,15 @@ arguments separated by " " (space) instead of "\t" (tab). *:lua* :[range]lua {chunk} Executes Lua chunk {chunk}. - + if {chunk} starts with "=" the rest of the chunk is + evaluated as an expression and printed. `:lua =expr` + is equivalent to `:lua print(vim.inspect(expr))` Examples: > :lua vim.api.nvim_command('echo "Hello, Nvim!"') < To see the Lua version: > :lua print(_VERSION) < To see the LuaJIT version: > - :lua print(jit.version) + :lua =jit.version < *:lua-heredoc* :[range]lua << [endmarker] |