aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2022-01-06 11:10:56 -0700
committerGitHub <noreply@github.com>2022-01-06 11:10:56 -0700
commitd78e46679d2ff31916091f9368367ccc1539c299 (patch)
treeeab41e8ecf863638324ed85769df5c42451f1fce /runtime/doc
parent2f779e33615d41e4472b3705e68ef9465b5f5d4e (diff)
downloadrneovim-d78e46679d2ff31916091f9368367ccc1539c299.tar.gz
rneovim-d78e46679d2ff31916091f9368367ccc1539c299.tar.bz2
rneovim-d78e46679d2ff31916091f9368367ccc1539c299.zip
feat(lua): add notify_once() (#16956)
Like vim.notify(), but only displays the notification once.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt31
1 files changed, 22 insertions, 9 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index e3b66c94ba..d25ed4e3f1 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1240,19 +1240,32 @@ inspect({object}, {options}) *vim.inspect()*
https://github.com/kikito/inspect.lua
https://github.com/mpeterv/vinspect
-notify({msg}, {log_level}, {opts}) *vim.notify()*
- Notification provider
+notify({msg}, {level}, {opts}) *vim.notify()*
+ Display a notification to the user.
- Without a runtime, writes to :Messages
+ This function can be overridden by plugins to display
+ notifications using a custom provider (such as the system
+ notification provider). By default, writes to |:messages|.
Parameters: ~
- {msg} string Content of the notification to show to
- the user
- {log_level} number|nil enum from vim.log.levels
- {opts} table|nil additional options (timeout, etc)
+ {msg} string Content of the notification to show to the
+ user.
+ {level} number|nil One of the values from
+ |vim.log.levels|.
+ {opts} table|nil Optional parameters. Unused by default.
- See also: ~
- :help nvim_notify
+notify_once({msg}, {level}, {opts}) *vim.notify_once()*
+ Display a notification only one time.
+
+ Like |vim.notify()|, but subsequent calls with the same
+ message will not display a notification.
+
+ Parameters: ~
+ {msg} string Content of the notification to show to the
+ user.
+ {level} number|nil One of the values from
+ |vim.log.levels|.
+ {opts} table|nil Optional parameters. Unused by default.
on_key({fn}, {ns_id}) *vim.on_key()*
Adds Lua function {fn} with namespace id {ns_id} as a listener