mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
docs: small fixes
Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: HiPhish <hiphish@posteo.de> Co-authored-by: JD Rudie <rudiejd@miamioh.edu>
This commit is contained in:
parent
735aa4c4c8
commit
b3eda5e73f
@ -102,11 +102,11 @@ Examples:
|
|||||||
The provider framework invokes Vimscript from C. It is composed of two
|
The provider framework invokes Vimscript from C. It is composed of two
|
||||||
functions in eval.c:
|
functions in eval.c:
|
||||||
|
|
||||||
- eval_call_provider(name, method, arguments, discard): calls
|
- eval_call_provider({name}, {method}, {arguments}, {discard}): Calls
|
||||||
provider#{name}#Call with the method and arguments. If discard is true, any
|
`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
|
value returned by the provider will be discarded and empty value will be
|
||||||
returned.
|
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
|
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.
|
"enabled and working". Called by |has()| to check if features are available.
|
||||||
|
|
||||||
|
@ -121,16 +121,14 @@ languages like Python and C#. Example: >lua
|
|||||||
|
|
||||||
func_with_opts { foo = true, filename = "hello.world" }
|
func_with_opts { foo = true, filename = "hello.world" }
|
||||||
<
|
<
|
||||||
There's nothing special going on here except that parentheses are treated as
|
There's nothing special going on here except that parentheses are implicitly
|
||||||
whitespace. But visually, this small bit of sugar gets reasonably close to
|
added. But visually, this small bit of sugar gets reasonably close to a
|
||||||
a "keyword args" interface. Nvim code tends to prefer this style.
|
"keyword args" interface.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
LUA PATTERNS *lua-patterns*
|
|
||||||
|
|
||||||
|
*lua-regex*
|
||||||
Lua intentionally does not support regular expressions, instead it has limited
|
Lua intentionally does not support regular expressions, instead it has limited
|
||||||
"patterns" |lua-pattern| which avoid the performance pitfalls of extended
|
|lua-patterns| which avoid the performance pitfalls of extended regex. Lua
|
||||||
regex. Lua scripts can also use Vim regex via |vim.regex()|.
|
scripts can also use Vim regex via |vim.regex()|.
|
||||||
|
|
||||||
Examples: >lua
|
Examples: >lua
|
||||||
|
|
||||||
|
@ -4150,7 +4150,7 @@ string.upper({s}) *string.upper()*
|
|||||||
locale.
|
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
|
A character class is used to represent a set of characters. The following
|
||||||
combinations are allowed in describing a character class:
|
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 with the given index. Otherwise, it returns the name of the
|
||||||
upvalue.
|
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
|
Returns a string with a traceback of the call stack. An optional
|
||||||
{message} string is appended at the beginning of the traceback. An
|
{message} string is appended at the beginning of the traceback. An
|
||||||
optional {level} number tells at which level to start the traceback
|
optional {level} number tells at which level to start the traceback
|
||||||
|
@ -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
|
-- 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.
|
-- should search for a matching named one in the results list.
|
||||||
-- However, if you search for man -w clock_gettime, you will *only* get
|
-- 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
|
-- clock_gettime will no longer work. In this case, we should just use the
|
||||||
-- first one that was found in the correct section.
|
-- first one that was found in the correct section.
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user