docs: misc

Co-authored-by: Jan Weinkauff <jan@weinkauff.cloud>
Co-authored-by: MeanderingProgrammer <meanderingprogrammer@gmail.com>
Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
This commit is contained in:
dundargoc
2025-05-18 16:09:30 +02:00
committed by Christian Clason
parent 1deba926c4
commit 4367441213
9 changed files with 38 additions and 18 deletions

View File

@ -128,8 +128,8 @@ Some can be auto-bumped by `scripts/bump_deps.lua`.
* [Lua](https://www.lua.org/download.html) * [Lua](https://www.lua.org/download.html)
* [Luv](https://github.com/luvit/luv) * [Luv](https://github.com/luvit/luv)
* When bumping, also sync * When bumping, also sync
- [our bundled meta file](https://github.com/neovim/neovim/blob/master/runtime/lua/uv/_meta.lua) with [the upstream meta file](https://github.com/luvit/luv/blob/master/meta.lua); - [our bundled meta file](https://github.com/neovim/neovim/blob/master/runtime/lua/uv/_meta.lua) with [the upstream meta file](https://github.com/luvit/luv/blob/master/docs/meta.lua);
- [our bundled documentation](https://github.com/neovim/neovim/blob/master/runtime/doc/luvref.txt) with [the upstream documentation](https://github.com/luvit/luv/blob/master/docs.md). - [our bundled documentation](https://github.com/neovim/neovim/blob/master/runtime/doc/luvref.txt) with [the upstream documentation](https://github.com/luvit/luv/blob/master/docs/docs.md).
* [gettext](https://ftp.gnu.org/pub/gnu/gettext/) * [gettext](https://ftp.gnu.org/pub/gnu/gettext/)
* [libiconv](https://ftp.gnu.org/pub/gnu/libiconv) * [libiconv](https://ftp.gnu.org/pub/gnu/libiconv)
* [libuv](https://github.com/libuv/libuv) * [libuv](https://github.com/libuv/libuv)

View File

@ -211,7 +211,7 @@ following uses the `virtual_lines` handler when jumping to a diagnostic: >lua
end end
vim.diagnostic.config({ jump = { on_jump = on_jump } }) vim.diagnostic.config({ jump = { on_jump = on_jump } })
<
*diagnostic-loclist-example* *diagnostic-loclist-example*
Whenever the |location-list| is opened, the following `show` handler will show Whenever the |location-list| is opened, the following `show` handler will show
the most recent diagnostics: >lua the most recent diagnostics: >lua

View File

@ -2202,7 +2202,7 @@ uv.pipe_bind2({pipe}, {name}, {flags}) *uv.pipe_bind2()*
Returns: `0` or `fail` Returns: `0` or `fail`
*Note*: Note:
1. Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) 1. Paths on Unix get truncated to sizeof(sockaddr_un.sun_path)
bytes, typically between 92 and 108 bytes. bytes, typically between 92 and 108 bytes.
2. New in version 1.46.0. 2. New in version 1.46.0.
@ -2235,7 +2235,7 @@ uv.pipe_connect2(pipe, name, [flags], [callback]) *uv.pipe_connect2()*
Returns: `uv_connect_t userdata` or `fail` Returns: `uv_connect_t userdata` or `fail`
*Note*: Note:
1. Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) 1. Paths on Unix get truncated to sizeof(sockaddr_un.sun_path)
bytes, typically between 92 and 108 bytes. bytes, typically between 92 and 108 bytes.
2. New in version 1.46.0. 2. New in version 1.46.0.

View File

@ -69,7 +69,7 @@ allows you to associate names with a specific node in a pattern. A `predicate`
adds arbitrary metadata and conditional data to a match. adds arbitrary metadata and conditional data to a match.
Queries are written in a lisp-like language documented in Queries are written in a lisp-like language documented in
https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax https://tree-sitter.github.io/tree-sitter/using-parsers/queries/1-syntax.html
Note: The predicates listed there differ from those Nvim supports. See Note: The predicates listed there differ from those Nvim supports. See
|treesitter-predicates| for a complete list of predicates supported by Nvim. |treesitter-predicates| for a complete list of predicates supported by Nvim.
@ -1134,7 +1134,7 @@ start({bufnr}, {lang}) *vim.treesitter.start()*
Can be used in an ftplugin or FileType autocommand. Can be used in an ftplugin or FileType autocommand.
Note: By default, disables regex syntax highlighting, which may be Note: By default, disables regex syntax highlighting, which may be
required for some plugins. In this case, add `vim.bo.syntax = 'on'` after required for some plugins. In this case, add `vim.bo.syntax = 'ON'` after
the call to `start`. the call to `start`.
Note: By default, the highlighter parses code asynchronously, using a Note: By default, the highlighter parses code asynchronously, using a
@ -1144,7 +1144,7 @@ start({bufnr}, {lang}) *vim.treesitter.start()*
vim.api.nvim_create_autocmd( 'FileType', { pattern = 'tex', vim.api.nvim_create_autocmd( 'FileType', { pattern = 'tex',
callback = function(args) callback = function(args)
vim.treesitter.start(args.buf, 'latex') vim.treesitter.start(args.buf, 'latex')
vim.bo[args.buf].syntax = 'on' -- only if additional legacy syntax is needed vim.bo[args.buf].syntax = 'ON' -- only if additional legacy syntax is needed
end end
}) })
< <

View File

@ -490,6 +490,7 @@ These Nvim features were later integrated into Vim.
- |:sign-define| "numhl" argument - |:sign-define| "numhl" argument
- |:source| works with anonymous (no file) scripts - |:source| works with anonymous (no file) scripts
- 'statusline' supports unlimited alignment sections - 'statusline' supports unlimited alignment sections
- |vim-tutor-mode|
============================================================================== ==============================================================================
Other changes *nvim-changed* Other changes *nvim-changed*

View File

@ -3115,6 +3115,7 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
Examples: >vim Examples: >vim
let bufmodified = getbufvar(1, "&mod") let bufmodified = getbufvar(1, "&mod")
echo "todo myvar = " .. getbufvar("todo", "myvar") echo "todo myvar = " .. getbufvar("todo", "myvar")
<
Parameters: ~ Parameters: ~
• {buf} (`integer|string`) • {buf} (`integer|string`)
@ -4520,6 +4521,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
Examples: >vim Examples: >vim
let list_is_on = getwinvar(2, '&list') let list_is_on = getwinvar(2, '&list')
echo "myvar = " .. getwinvar(1, 'myvar') echo "myvar = " .. getwinvar(1, 'myvar')
<
Parameters: ~ Parameters: ~
• {winnr} (`integer`) • {winnr} (`integer`)
@ -5219,6 +5221,7 @@ inputlist({textlist}) *inputlist()*
Example: >vim Example: >vim
let color = inputlist(['Select color:', '1. red', let color = inputlist(['Select color:', '1. red',
\ '2. green', '3. blue']) \ '2. green', '3. blue'])
<
Parameters: ~ Parameters: ~
• {textlist} (`string[]`) • {textlist} (`string[]`)
@ -5720,6 +5723,7 @@ libcall({libname}, {funcname}, {argument}) *libcall()* *E364* *E
object code must be compiled as position-independent ('PIC'). object code must be compiled as position-independent ('PIC').
Examples: >vim Examples: >vim
echo libcall("libc.so", "getenv", "HOME") echo libcall("libc.so", "getenv", "HOME")
<
Parameters: ~ Parameters: ~
• {libname} (`string`) • {libname} (`string`)
@ -9305,6 +9309,7 @@ setreg({regname}, {value} [, {options}]) *setreg()*
You can also change the type of a register by appending You can also change the type of a register by appending
nothing: >vim nothing: >vim
call setreg('a', '', 'al') call setreg('a', '', 'al')
<
Parameters: ~ Parameters: ~
• {regname} (`string`) • {regname} (`string`)
@ -9402,6 +9407,7 @@ setwinvar({nr}, {varname}, {val}) *setwinvar()*
Examples: >vim Examples: >vim
call setwinvar(1, "&list", 0) call setwinvar(1, "&list", 0)
call setwinvar(2, "myvar", "foobar") call setwinvar(2, "myvar", "foobar")
<
Parameters: ~ Parameters: ~
• {nr} (`integer`) • {nr} (`integer`)
@ -9872,6 +9878,7 @@ sign_unplace({group} [, {dict}]) *sign_unplace()*
" Remove all the placed signs from all the buffers " Remove all the placed signs from all the buffers
call sign_unplace('*') call sign_unplace('*')
<
Parameters: ~ Parameters: ~
• {group} (`string`) • {group} (`string`)
@ -10528,6 +10535,7 @@ strftime({format} [, {time}]) *strftime()*
echo strftime("%H:%M") " 11:55 echo strftime("%H:%M") " 11:55
echo strftime("%c", getftime("file.c")) echo strftime("%c", getftime("file.c"))
" Show mod time of file.c. " Show mod time of file.c.
<
Parameters: ~ Parameters: ~
• {format} (`string`) • {format} (`string`)
@ -10870,6 +10878,7 @@ swapfilelist() *swapfilelist()*
let &directory = '.' let &directory = '.'
let swapfiles = swapfilelist() let swapfiles = swapfilelist()
let &directory = save_dir let &directory = save_dir
<
Return: ~ Return: ~
(`string[]`) (`string[]`)

View File

@ -2785,6 +2785,7 @@ function vim.fn.getbufoneline(buf, lnum) end
--- Examples: >vim --- Examples: >vim
--- let bufmodified = getbufvar(1, "&mod") --- let bufmodified = getbufvar(1, "&mod")
--- echo "todo myvar = " .. getbufvar("todo", "myvar") --- echo "todo myvar = " .. getbufvar("todo", "myvar")
--- <
--- ---
--- @param buf integer|string --- @param buf integer|string
--- @param varname string --- @param varname string
@ -4079,6 +4080,7 @@ function vim.fn.getwinposy() end
--- Examples: >vim --- Examples: >vim
--- let list_is_on = getwinvar(2, '&list') --- let list_is_on = getwinvar(2, '&list')
--- echo "myvar = " .. getwinvar(1, 'myvar') --- echo "myvar = " .. getwinvar(1, 'myvar')
--- <
--- ---
--- @param winnr integer --- @param winnr integer
--- @param varname string --- @param varname string
@ -4735,6 +4737,7 @@ function vim.fn.inputdialog(...) end
--- Example: >vim --- Example: >vim
--- let color = inputlist(['Select color:', '1. red', --- let color = inputlist(['Select color:', '1. red',
--- \ '2. green', '3. blue']) --- \ '2. green', '3. blue'])
--- <
--- ---
--- @param textlist string[] --- @param textlist string[]
--- @return any --- @return any
@ -5190,6 +5193,7 @@ function vim.fn.len(expr) end
--- object code must be compiled as position-independent ('PIC'). --- object code must be compiled as position-independent ('PIC').
--- Examples: >vim --- Examples: >vim
--- echo libcall("libc.so", "getenv", "HOME") --- echo libcall("libc.so", "getenv", "HOME")
--- <
--- ---
--- @param libname string --- @param libname string
--- @param funcname string --- @param funcname string
@ -8489,6 +8493,7 @@ function vim.fn.setqflist(list, action, what) end
--- You can also change the type of a register by appending --- You can also change the type of a register by appending
--- nothing: >vim --- nothing: >vim
--- call setreg('a', '', 'al') --- call setreg('a', '', 'al')
--- <
--- ---
--- @param regname string --- @param regname string
--- @param value any --- @param value any
@ -8574,6 +8579,7 @@ function vim.fn.settagstack(nr, dict, action) end
--- Examples: >vim --- Examples: >vim
--- call setwinvar(1, "&list", 0) --- call setwinvar(1, "&list", 0)
--- call setwinvar(2, "myvar", "foobar") --- call setwinvar(2, "myvar", "foobar")
--- <
--- ---
--- @param nr integer --- @param nr integer
--- @param varname string --- @param varname string
@ -9018,6 +9024,7 @@ function vim.fn.sign_undefine(list) end
--- ---
--- " Remove all the placed signs from all the buffers --- " Remove all the placed signs from all the buffers
--- call sign_unplace('*') --- call sign_unplace('*')
--- <
--- ---
--- @param group string --- @param group string
--- @param dict? vim.fn.sign_unplace.dict --- @param dict? vim.fn.sign_unplace.dict
@ -9610,6 +9617,7 @@ function vim.fn.strdisplaywidth(string, col) end
--- echo strftime("%H:%M") " 11:55 --- echo strftime("%H:%M") " 11:55
--- echo strftime("%c", getftime("file.c")) --- echo strftime("%c", getftime("file.c"))
--- " Show mod time of file.c. --- " Show mod time of file.c.
--- <
--- ---
--- @param format string --- @param format string
--- @param time? number --- @param time? number
@ -9918,6 +9926,7 @@ function vim.fn.substitute(string, pat, sub, flags) end
--- let &directory = '.' --- let &directory = '.'
--- let swapfiles = swapfilelist() --- let swapfiles = swapfilelist()
--- let &directory = save_dir --- let &directory = save_dir
--- <
--- ---
--- @return string[] --- @return string[]
function vim.fn.swapfilelist() end function vim.fn.swapfilelist() end

View File

@ -430,7 +430,7 @@ end
--- Can be used in an ftplugin or FileType autocommand. --- Can be used in an ftplugin or FileType autocommand.
--- ---
--- Note: By default, disables regex syntax highlighting, which may be required for some plugins. --- Note: By default, disables regex syntax highlighting, which may be required for some plugins.
--- In this case, add `vim.bo.syntax = 'on'` after the call to `start`. --- In this case, add `vim.bo.syntax = 'ON'` after the call to `start`.
--- ---
--- Note: By default, the highlighter parses code asynchronously, using a segment time of 3ms. --- Note: By default, the highlighter parses code asynchronously, using a segment time of 3ms.
--- ---
@ -440,7 +440,7 @@ end
--- vim.api.nvim_create_autocmd( 'FileType', { pattern = 'tex', --- vim.api.nvim_create_autocmd( 'FileType', { pattern = 'tex',
--- callback = function(args) --- callback = function(args)
--- vim.treesitter.start(args.buf, 'latex') --- vim.treesitter.start(args.buf, 'latex')
--- vim.bo[args.buf].syntax = 'on' -- only if additional legacy syntax is needed --- vim.bo[args.buf].syntax = 'ON' -- only if additional legacy syntax is needed
--- end --- end
--- }) --- })
--- ``` --- ```

View File

@ -3511,7 +3511,7 @@ M.funcs = {
Examples: >vim Examples: >vim
let bufmodified = getbufvar(1, "&mod") let bufmodified = getbufvar(1, "&mod")
echo "todo myvar = " .. getbufvar("todo", "myvar") echo "todo myvar = " .. getbufvar("todo", "myvar")
<
]=], ]=],
name = 'getbufvar', name = 'getbufvar',
params = { { 'buf', 'integer|string' }, { 'varname', 'string' }, { 'def', 'any' } }, params = { { 'buf', 'integer|string' }, { 'varname', 'string' }, { 'def', 'any' } },
@ -5047,7 +5047,7 @@ M.funcs = {
Examples: >vim Examples: >vim
let list_is_on = getwinvar(2, '&list') let list_is_on = getwinvar(2, '&list')
echo "myvar = " .. getwinvar(1, 'myvar') echo "myvar = " .. getwinvar(1, 'myvar')
<
]=], ]=],
name = 'getwinvar', name = 'getwinvar',
params = { { 'winnr', 'integer' }, { 'varname', 'string' }, { 'def', 'any' } }, params = { { 'winnr', 'integer' }, { 'varname', 'string' }, { 'def', 'any' } },
@ -5821,7 +5821,7 @@ M.funcs = {
Example: >vim Example: >vim
let color = inputlist(['Select color:', '1. red', let color = inputlist(['Select color:', '1. red',
\ '2. green', '3. blue']) \ '2. green', '3. blue'])
<
]=], ]=],
name = 'inputlist', name = 'inputlist',
params = { { 'textlist', 'string[]' } }, params = { { 'textlist', 'string[]' } },
@ -6400,7 +6400,7 @@ M.funcs = {
object code must be compiled as position-independent ('PIC'). object code must be compiled as position-independent ('PIC').
Examples: >vim Examples: >vim
echo libcall("libc.so", "getenv", "HOME") echo libcall("libc.so", "getenv", "HOME")
<
]=], ]=],
name = 'libcall', name = 'libcall',
params = { { 'libname', 'string' }, { 'funcname', 'string' }, { 'argument', 'any' } }, params = { { 'libname', 'string' }, { 'funcname', 'string' }, { 'argument', 'any' } },
@ -10256,7 +10256,7 @@ M.funcs = {
You can also change the type of a register by appending You can also change the type of a register by appending
nothing: >vim nothing: >vim
call setreg('a', '', 'al') call setreg('a', '', 'al')
<
]=], ]=],
name = 'setreg', name = 'setreg',
params = { { 'regname', 'string' }, { 'value', 'any' }, { 'options', 'string' } }, params = { { 'regname', 'string' }, { 'value', 'any' }, { 'options', 'string' } },
@ -10356,7 +10356,7 @@ M.funcs = {
Examples: >vim Examples: >vim
call setwinvar(1, "&list", 0) call setwinvar(1, "&list", 0)
call setwinvar(2, "myvar", "foobar") call setwinvar(2, "myvar", "foobar")
<
]=], ]=],
name = 'setwinvar', name = 'setwinvar',
params = { { 'nr', 'integer' }, { 'varname', 'string' }, { 'val', 'any' } }, params = { { 'nr', 'integer' }, { 'varname', 'string' }, { 'val', 'any' } },
@ -10861,7 +10861,7 @@ M.funcs = {
" Remove all the placed signs from all the buffers " Remove all the placed signs from all the buffers
call sign_unplace('*') call sign_unplace('*')
<
]=], ]=],
name = 'sign_unplace', name = 'sign_unplace',
params = { { 'group', 'string' }, { 'dict', 'vim.fn.sign_unplace.dict' } }, params = { { 'group', 'string' }, { 'dict', 'vim.fn.sign_unplace.dict' } },
@ -11572,7 +11572,7 @@ M.funcs = {
echo strftime("%H:%M") " 11:55 echo strftime("%H:%M") " 11:55
echo strftime("%c", getftime("file.c")) echo strftime("%c", getftime("file.c"))
" Show mod time of file.c. " Show mod time of file.c.
<
]=], ]=],
name = 'strftime', name = 'strftime',
params = { { 'format', 'string' }, { 'time', 'number' } }, params = { { 'format', 'string' }, { 'time', 'number' } },
@ -11961,6 +11961,7 @@ M.funcs = {
let &directory = '.' let &directory = '.'
let swapfiles = swapfilelist() let swapfiles = swapfilelist()
let &directory = save_dir let &directory = save_dir
<
]=], ]=],
name = 'swapfilelist', name = 'swapfilelist',
params = {}, params = {},