From b3eda5e73f65092d50ccd27a0373e8b9fad076b0 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 28 Dec 2023 13:49:44 +0100 Subject: [PATCH] docs: small fixes Co-authored-by: Christian Clason Co-authored-by: HiPhish Co-authored-by: JD Rudie --- runtime/doc/develop.txt | 6 +++--- runtime/doc/lua.txt | 14 ++++++-------- runtime/doc/luaref.txt | 4 ++-- runtime/lua/man.lua | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index f1d74326c7..28f43a70e0 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -102,11 +102,11 @@ Examples: The provider framework invokes Vimscript from C. It is composed of two functions in eval.c: -- eval_call_provider(name, method, arguments, discard): calls - provider#{name}#Call with the method and arguments. If discard is true, any +- eval_call_provider({name}, {method}, {arguments}, {discard}): Calls + `provider#{name}#Call` with {method} and {arguments}. If {discard} is true, any value returned by the provider will be discarded and empty value will be returned. -- eval_has_provider(name): Checks the `g:loaded_{name}_provider` variable +- eval_has_provider({name}): Checks the `g:loaded_{name}_provider` variable which must be set to 2 by the provider script to indicate that it is "enabled and working". Called by |has()| to check if features are available. diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index a8d36d7062..9c9a9db175 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -121,16 +121,14 @@ languages like Python and C#. Example: >lua func_with_opts { foo = true, filename = "hello.world" } < -There's nothing special going on here except that parentheses are treated as -whitespace. But visually, this small bit of sugar gets reasonably close to -a "keyword args" interface. Nvim code tends to prefer this style. - ------------------------------------------------------------------------------- -LUA PATTERNS *lua-patterns* +There's nothing special going on here except that parentheses are implicitly +added. But visually, this small bit of sugar gets reasonably close to a +"keyword args" interface. + *lua-regex* Lua intentionally does not support regular expressions, instead it has limited -"patterns" |lua-pattern| which avoid the performance pitfalls of extended -regex. Lua scripts can also use Vim regex via |vim.regex()|. +|lua-patterns| which avoid the performance pitfalls of extended regex. Lua +scripts can also use Vim regex via |vim.regex()|. Examples: >lua diff --git a/runtime/doc/luaref.txt b/runtime/doc/luaref.txt index 467b5760cf..e7b62f4c6c 100644 --- a/runtime/doc/luaref.txt +++ b/runtime/doc/luaref.txt @@ -4150,7 +4150,7 @@ string.upper({s}) *string.upper()* locale. ------------------------------------------------------------------------------ -5.4.1 Patterns *lua-patterns +5.4.1 Patterns *lua-patterns* A character class is used to represent a set of characters. The following combinations are allowed in describing a character class: @@ -4811,7 +4811,7 @@ debug.setupvalue({func}, {up}, {value}) *debug.setupvalue()* upvalue with the given index. Otherwise, it returns the name of the upvalue. -debug.traceback([{thread},] [{message}] [,{level}]) *debug.traceback()* +debug.traceback([{thread},] [{message} [,{level}]]) *debug.traceback()* Returns a string with a traceback of the call stack. An optional {message} string is appended at the beginning of the traceback. An optional {level} number tells at which level to start the traceback diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua index dcdfc2b87f..ac15aff60c 100644 --- a/runtime/lua/man.lua +++ b/runtime/lua/man.lua @@ -238,7 +238,7 @@ local function get_path(sect, name, silent) -- If you run man -w strlen and string.3 comes up first, this is a problem. We -- should search for a matching named one in the results list. -- However, if you search for man -w clock_gettime, you will *only* get - -- clock_getres.2, which is the right page. Searching the resuls for + -- clock_getres.2, which is the right page. Searching the results for -- clock_gettime will no longer work. In this case, we should just use the -- first one that was found in the correct section. --