aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-03-15 08:56:13 -0400
committerGitHub <noreply@github.com>2023-03-15 05:56:13 -0700
commit210120dde81ec289ae01e1d247df08f0b147c08a (patch)
treee97b7cd1f8d1ed1bbafc4f443b29dd146817bd49 /runtime/doc
parent21eacbfef399f124e9d50f1757c89453c4e02944 (diff)
downloadrneovim-210120dde81ec289ae01e1d247df08f0b147c08a.tar.gz
rneovim-210120dde81ec289ae01e1d247df08f0b147c08a.tar.bz2
rneovim-210120dde81ec289ae01e1d247df08f0b147c08a.zip
fix(lua): vim.deprecate() shows ":help deprecated" #22677
Problem: vim.deprecate() shows ":help deprecated" for third-party plugins. ":help deprecated" only describes deprecations in Nvim, and is unrelated to any 3rd party deprecations. Solution: If `plugin` is specified, don't show ":help deprecated". fix #22235
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt2
-rw-r--r--runtime/doc/lua.txt15
2 files changed, 10 insertions, 7 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index fe1d6f1645..74c50f00a2 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -128,7 +128,7 @@ TREESITTER FUNCTIONS
and |TSNode:type()| instead.
LUA
-- *vim.register_keystroke_callback()* Use |vim.on_key()| instead.
+- vim.register_keystroke_callback() Use |vim.on_key()| instead.
- *vim.pretty_print()* Use |vim.print()| instead.
NORMAL COMMANDS
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 68f63f4fb8..611f2e0d32 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1386,17 +1386,20 @@ defer_fn({fn}, {timeout}) *vim.defer_fn()*
*vim.deprecate()*
deprecate({name}, {alternative}, {version}, {plugin}, {backtrace})
- Display a deprecation notification to the user.
+ Shows a deprecation message to the user.
Parameters: ~
- • {name} string Deprecated function.
- • {alternative} (string|nil) Preferred alternative function.
- • {version} string Version in which the deprecated function will be
+ • {name} string Deprecated feature (function, API, etc.).
+ • {alternative} (string|nil) Suggested alternative feature.
+ • {version} string Version when the deprecated function will be
removed.
- • {plugin} string|nil Plugin name that the function will be
- removed from. Defaults to "Nvim".
+ • {plugin} string|nil Name of the plugin that owns the deprecated
+ feature. Defaults to "Nvim".
• {backtrace} boolean|nil Prints backtrace. Defaults to true.
+ Return: ~
+ Deprecated message, or nil if no message was shown.
+
inspect({object}, {options}) *vim.inspect()*
Gets a human-readable representation of the given object.