diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2025-01-07 14:20:45 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2025-01-09 13:35:40 +0100 |
commit | ead5683ff9994c0fbfc6c38e0911d9455777550b (patch) | |
tree | af8d0e65f3640393077202bbf44a57da7199ac76 /runtime/lua/vim/_meta | |
parent | b67fcd0488746b079a3b721ae4800af94cd126e1 (diff) | |
download | rneovim-ead5683ff9994c0fbfc6c38e0911d9455777550b.tar.gz rneovim-ead5683ff9994c0fbfc6c38e0911d9455777550b.tar.bz2 rneovim-ead5683ff9994c0fbfc6c38e0911d9455777550b.zip |
feat(api): add err field to nvim_echo() opts
Problem: We want to deprecate `nvim_err_write(ln)()` but there is no
obvious replacement (from Lua). Meanwhile we already have
`nvim_echo()` with an `opts` argument.
Solution: Add `err` argument to `nvim_echo()` that directly maps to
`:echoerr`.
Diffstat (limited to 'runtime/lua/vim/_meta')
-rw-r--r-- | runtime/lua/vim/_meta/api.lua | 2 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/api_keysets.lua | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index 7297c8ad38..b0651efca4 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1104,6 +1104,8 @@ function vim.api.nvim_del_var(name) end --- `hl_group` element can be omitted for no highlight. --- @param history boolean if true, add to `message-history`. --- @param opts vim.api.keyset.echo_opts Optional parameters. +--- - err: Treat the message like `:echoerr`. Omitted `hlgroup` +--- uses `hl-ErrorMsg` instead. --- - verbose: Message is printed as a result of 'verbose' option. --- If Nvim was invoked with -V3log_file, the message will be --- redirected to the log_file and suppressed from direct output. diff --git a/runtime/lua/vim/_meta/api_keysets.lua b/runtime/lua/vim/_meta/api_keysets.lua index e11dddb2d3..1baae2fd71 100644 --- a/runtime/lua/vim/_meta/api_keysets.lua +++ b/runtime/lua/vim/_meta/api_keysets.lua @@ -88,6 +88,7 @@ error('Cannot require a meta file') --- @field pattern? string|string[] --- @class vim.api.keyset.echo_opts +--- @field err? boolean --- @field verbose? boolean --- @class vim.api.keyset.empty |