aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-01-07 14:20:45 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2025-01-09 13:35:40 +0100
commitead5683ff9994c0fbfc6c38e0911d9455777550b (patch)
treeaf8d0e65f3640393077202bbf44a57da7199ac76 /runtime/doc
parentb67fcd0488746b079a3b721ae4800af94cd126e1 (diff)
downloadrneovim-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/doc')
-rw-r--r--runtime/doc/api.txt2
-rw-r--r--runtime/doc/news.txt2
2 files changed, 4 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index c8e0dcd0c5..514479b8ba 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -662,6 +662,8 @@ nvim_echo({chunks}, {history}, {opts}) *nvim_echo()*
`hl_group` element can be omitted for no highlight.
• {history} if true, add to |message-history|.
• {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
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index b7606e65f5..cb7916d0e9 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -178,6 +178,8 @@ API
• Improved API "meta" docstrings and :help documentation.
• |nvim__ns_set()| can set properties for a namespace
+• |nvim_echo()| `err` field to print error messages and `chunks` accepts
+ highlight group IDs.
DEFAULTS