aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt76
1 files changed, 75 insertions, 1 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index c3893d05c0..03056a603f 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1118,6 +1118,23 @@ vim.wo *vim.wo*
==============================================================================
Lua module: vim *lua-vim*
+defer_fn({fn}, {timeout}) *vim.defer_fn()*
+ Defers calling `fn` until `timeout` ms passes.
+
+ Use to do a one-shot timer that calls `fn` Note: The {fn} is |schedule_wrap|ped automatically, so API
+ functions are safe to call.
+
+ Parameters: ~
+ {fn} Callback to call once `timeout` expires
+ {timeout} Number of milliseconds to wait before calling
+ `fn`
+
+ Return: ~
+ timer luv timer object
+
+insert_keys({obj}) *vim.insert_keys()*
+ TODO: Documentation
+
inspect({object}, {options}) *vim.inspect()*
Return a human-readable representation of the given object.
@@ -1125,9 +1142,19 @@ inspect({object}, {options}) *vim.inspect()*
https://github.com/kikito/inspect.lua
https://github.com/mpeterv/vinspect
-make_meta_accessor({get}, {set}, {del}) *vim.make_meta_accessor()*
+make_dict_accessor({scope}) *vim.make_dict_accessor()*
TODO: Documentation
+notify({msg}, {log_level}, {_opts}) *vim.notify()*
+ Notification provider without a runtime, writes to :Messages
+
+ Parameters: ~
+ {msg} Content of the notification to show to the
+ user
+ {log_level} Optional log level
+ {opts} Dictionary with optional options (timeout,
+ etc)
+
paste({lines}, {phase}) *vim.paste()*
Paste handler, invoked by |nvim_paste()| when a conforming UI
(such as the |TUI|) pastes text into the editor.
@@ -1160,6 +1187,53 @@ paste({lines}, {phase}) *vim.paste()*
See also: ~
|paste|
+region({bufnr}, {pos1}, {pos2}, {regtype}, {inclusive}) *vim.region()*
+ Get a table of lines with start, end columns for a region
+ marked by two points
+
+ Parameters: ~
+ {bufnr} number of buffer
+ {pos1} (line, column) tuple marking beginning of
+ region
+ {pos2} (line, column) tuple marking end of region
+ {regtype} type of selection (:help setreg)
+ {inclusive} boolean indicating whether the selection is
+ end-inclusive
+
+ Return: ~
+ region lua table of the form {linenr = {startcol,endcol}}
+
+ *vim.register_keystroke_callback()*
+register_keystroke_callback({fn}, {ns_id})
+ Register a lua {fn} with an {id} to be run after every
+ keystroke.
+
+ If {fn} is nil, it removes the callback for the associated
+ {ns_id}
+ Note:
+ {fn} will not be cleared from |nvim_buf_clear_namespace()|
+
+ Note:
+ {fn} will receive the keystrokes after mappings have been
+ evaluated
+
+ Parameters: ~
+ {fn} function: Function to call. It should take one
+ argument, which is a string. The string will contain
+ the literal keys typed. See |i_CTRL-V|
+ {ns_id} number? Namespace ID. If not passed or 0, will
+ generate and return a new namespace ID from
+ |nvim_create_namesapce()|
+
+ Return: ~
+ number Namespace ID associated with {fn}
+
+ Note:
+ {fn} will be automatically removed if an error occurs
+ while calling. This is to prevent the annoying situation
+ of every keystroke erroring while trying to remove a
+ broken callback.
+
schedule_wrap({cb}) *vim.schedule_wrap()*
Defers callback `cb` until the Nvim API is safe to call.