aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/lua.txt14
-rw-r--r--src/nvim/lua/vim.lua10
2 files changed, 10 insertions, 14 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 5e9189158a..2db1974966 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1200,20 +1200,16 @@ inspect({object}, {options}) *vim.inspect()*
https://github.com/kikito/inspect.lua
https://github.com/mpeterv/vinspect
-make_dict_accessor({scope}, {handle}) *vim.make_dict_accessor()*
- TODO: Documentation
-
-notify({msg}, {log_level}, {_opts}) *vim.notify()*
+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)
+ {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)
See also: ~
:help nvim_notify
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua
index 30c7034209..ad886b40dd 100644
--- a/src/nvim/lua/vim.lua
+++ b/src/nvim/lua/vim.lua
@@ -323,6 +323,7 @@ end
do
local validate = vim.validate
+ --@private
local function make_dict_accessor(scope, handle)
validate {
scope = {scope, 's'};
@@ -422,11 +423,10 @@ end
---
--- Without a runtime, writes to :Messages
---@see :help nvim_notify
----@param msg Content of the notification to show to the user
----@param log_level Optional log level
----@param opts Dictionary with optional options (timeout, etc)
-function vim.notify(msg, log_level, _opts)
-
+---@param msg string Content of the notification to show to the user
+---@param log_level number|nil enum from vim.log.levels
+---@param opts table|nil additional options (timeout, etc)
+function vim.notify(msg, log_level, opts) -- luacheck: no unused
if log_level == vim.log.levels.ERROR then
vim.api.nvim_err_writeln(msg)
elseif log_level == vim.log.levels.WARN then