mirror of
https://github.com/neovim/neovim
synced 2025-07-15 00:31:45 +00:00
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:
committed by
Christian Clason
parent
1deba926c4
commit
4367441213
@ -128,8 +128,8 @@ Some can be auto-bumped by `scripts/bump_deps.lua`.
|
||||
* [Lua](https://www.lua.org/download.html)
|
||||
* [Luv](https://github.com/luvit/luv)
|
||||
* 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 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 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/docs.md).
|
||||
* [gettext](https://ftp.gnu.org/pub/gnu/gettext/)
|
||||
* [libiconv](https://ftp.gnu.org/pub/gnu/libiconv)
|
||||
* [libuv](https://github.com/libuv/libuv)
|
||||
|
@ -211,7 +211,7 @@ following uses the `virtual_lines` handler when jumping to a diagnostic: >lua
|
||||
end
|
||||
|
||||
vim.diagnostic.config({ jump = { on_jump = on_jump } })
|
||||
|
||||
<
|
||||
*diagnostic-loclist-example*
|
||||
Whenever the |location-list| is opened, the following `show` handler will show
|
||||
the most recent diagnostics: >lua
|
||||
|
@ -2202,7 +2202,7 @@ uv.pipe_bind2({pipe}, {name}, {flags}) *uv.pipe_bind2()*
|
||||
|
||||
Returns: `0` or `fail`
|
||||
|
||||
*Note*:
|
||||
Note:
|
||||
1. Paths on Unix get truncated to sizeof(sockaddr_un.sun_path)
|
||||
bytes, typically between 92 and 108 bytes.
|
||||
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`
|
||||
|
||||
*Note*:
|
||||
Note:
|
||||
1. Paths on Unix get truncated to sizeof(sockaddr_un.sun_path)
|
||||
bytes, typically between 92 and 108 bytes.
|
||||
2. New in version 1.46.0.
|
||||
|
@ -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.
|
||||
|
||||
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
|
||||
|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.
|
||||
|
||||
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`.
|
||||
|
||||
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',
|
||||
callback = function(args)
|
||||
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
|
||||
})
|
||||
<
|
||||
|
@ -490,6 +490,7 @@ These Nvim features were later integrated into Vim.
|
||||
- |:sign-define| "numhl" argument
|
||||
- |:source| works with anonymous (no file) scripts
|
||||
- 'statusline' supports unlimited alignment sections
|
||||
- |vim-tutor-mode|
|
||||
|
||||
==============================================================================
|
||||
Other changes *nvim-changed*
|
||||
|
@ -3115,6 +3115,7 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
Examples: >vim
|
||||
let bufmodified = getbufvar(1, "&mod")
|
||||
echo "todo myvar = " .. getbufvar("todo", "myvar")
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {buf} (`integer|string`)
|
||||
@ -4520,6 +4521,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
|
||||
Examples: >vim
|
||||
let list_is_on = getwinvar(2, '&list')
|
||||
echo "myvar = " .. getwinvar(1, 'myvar')
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {winnr} (`integer`)
|
||||
@ -5219,6 +5221,7 @@ inputlist({textlist}) *inputlist()*
|
||||
Example: >vim
|
||||
let color = inputlist(['Select color:', '1. red',
|
||||
\ '2. green', '3. blue'])
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {textlist} (`string[]`)
|
||||
@ -5720,6 +5723,7 @@ libcall({libname}, {funcname}, {argument}) *libcall()* *E364* *E
|
||||
object code must be compiled as position-independent ('PIC').
|
||||
Examples: >vim
|
||||
echo libcall("libc.so", "getenv", "HOME")
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {libname} (`string`)
|
||||
@ -9305,6 +9309,7 @@ setreg({regname}, {value} [, {options}]) *setreg()*
|
||||
You can also change the type of a register by appending
|
||||
nothing: >vim
|
||||
call setreg('a', '', 'al')
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {regname} (`string`)
|
||||
@ -9402,6 +9407,7 @@ setwinvar({nr}, {varname}, {val}) *setwinvar()*
|
||||
Examples: >vim
|
||||
call setwinvar(1, "&list", 0)
|
||||
call setwinvar(2, "myvar", "foobar")
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {nr} (`integer`)
|
||||
@ -9872,6 +9878,7 @@ sign_unplace({group} [, {dict}]) *sign_unplace()*
|
||||
|
||||
" Remove all the placed signs from all the buffers
|
||||
call sign_unplace('*')
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {group} (`string`)
|
||||
@ -10528,6 +10535,7 @@ strftime({format} [, {time}]) *strftime()*
|
||||
echo strftime("%H:%M") " 11:55
|
||||
echo strftime("%c", getftime("file.c"))
|
||||
" Show mod time of file.c.
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
• {format} (`string`)
|
||||
@ -10870,6 +10878,7 @@ swapfilelist() *swapfilelist()*
|
||||
let &directory = '.'
|
||||
let swapfiles = swapfilelist()
|
||||
let &directory = save_dir
|
||||
<
|
||||
|
||||
Return: ~
|
||||
(`string[]`)
|
||||
|
9
runtime/lua/vim/_meta/vimfn.lua
generated
9
runtime/lua/vim/_meta/vimfn.lua
generated
@ -2785,6 +2785,7 @@ function vim.fn.getbufoneline(buf, lnum) end
|
||||
--- Examples: >vim
|
||||
--- let bufmodified = getbufvar(1, "&mod")
|
||||
--- echo "todo myvar = " .. getbufvar("todo", "myvar")
|
||||
--- <
|
||||
---
|
||||
--- @param buf integer|string
|
||||
--- @param varname string
|
||||
@ -4079,6 +4080,7 @@ function vim.fn.getwinposy() end
|
||||
--- Examples: >vim
|
||||
--- let list_is_on = getwinvar(2, '&list')
|
||||
--- echo "myvar = " .. getwinvar(1, 'myvar')
|
||||
--- <
|
||||
---
|
||||
--- @param winnr integer
|
||||
--- @param varname string
|
||||
@ -4735,6 +4737,7 @@ function vim.fn.inputdialog(...) end
|
||||
--- Example: >vim
|
||||
--- let color = inputlist(['Select color:', '1. red',
|
||||
--- \ '2. green', '3. blue'])
|
||||
--- <
|
||||
---
|
||||
--- @param textlist string[]
|
||||
--- @return any
|
||||
@ -5190,6 +5193,7 @@ function vim.fn.len(expr) end
|
||||
--- object code must be compiled as position-independent ('PIC').
|
||||
--- Examples: >vim
|
||||
--- echo libcall("libc.so", "getenv", "HOME")
|
||||
--- <
|
||||
---
|
||||
--- @param libname 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
|
||||
--- nothing: >vim
|
||||
--- call setreg('a', '', 'al')
|
||||
--- <
|
||||
---
|
||||
--- @param regname string
|
||||
--- @param value any
|
||||
@ -8574,6 +8579,7 @@ function vim.fn.settagstack(nr, dict, action) end
|
||||
--- Examples: >vim
|
||||
--- call setwinvar(1, "&list", 0)
|
||||
--- call setwinvar(2, "myvar", "foobar")
|
||||
--- <
|
||||
---
|
||||
--- @param nr integer
|
||||
--- @param varname string
|
||||
@ -9018,6 +9024,7 @@ function vim.fn.sign_undefine(list) end
|
||||
---
|
||||
--- " Remove all the placed signs from all the buffers
|
||||
--- call sign_unplace('*')
|
||||
--- <
|
||||
---
|
||||
--- @param group string
|
||||
--- @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("%c", getftime("file.c"))
|
||||
--- " Show mod time of file.c.
|
||||
--- <
|
||||
---
|
||||
--- @param format string
|
||||
--- @param time? number
|
||||
@ -9918,6 +9926,7 @@ function vim.fn.substitute(string, pat, sub, flags) end
|
||||
--- let &directory = '.'
|
||||
--- let swapfiles = swapfilelist()
|
||||
--- let &directory = save_dir
|
||||
--- <
|
||||
---
|
||||
--- @return string[]
|
||||
function vim.fn.swapfilelist() end
|
||||
|
@ -430,7 +430,7 @@ end
|
||||
--- Can be used in an ftplugin or FileType autocommand.
|
||||
---
|
||||
--- 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.
|
||||
---
|
||||
@ -440,7 +440,7 @@ end
|
||||
--- vim.api.nvim_create_autocmd( 'FileType', { pattern = 'tex',
|
||||
--- callback = function(args)
|
||||
--- 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
|
||||
--- })
|
||||
--- ```
|
||||
|
@ -3511,7 +3511,7 @@ M.funcs = {
|
||||
Examples: >vim
|
||||
let bufmodified = getbufvar(1, "&mod")
|
||||
echo "todo myvar = " .. getbufvar("todo", "myvar")
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'getbufvar',
|
||||
params = { { 'buf', 'integer|string' }, { 'varname', 'string' }, { 'def', 'any' } },
|
||||
@ -5047,7 +5047,7 @@ M.funcs = {
|
||||
Examples: >vim
|
||||
let list_is_on = getwinvar(2, '&list')
|
||||
echo "myvar = " .. getwinvar(1, 'myvar')
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'getwinvar',
|
||||
params = { { 'winnr', 'integer' }, { 'varname', 'string' }, { 'def', 'any' } },
|
||||
@ -5821,7 +5821,7 @@ M.funcs = {
|
||||
Example: >vim
|
||||
let color = inputlist(['Select color:', '1. red',
|
||||
\ '2. green', '3. blue'])
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'inputlist',
|
||||
params = { { 'textlist', 'string[]' } },
|
||||
@ -6400,7 +6400,7 @@ M.funcs = {
|
||||
object code must be compiled as position-independent ('PIC').
|
||||
Examples: >vim
|
||||
echo libcall("libc.so", "getenv", "HOME")
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'libcall',
|
||||
params = { { 'libname', 'string' }, { 'funcname', 'string' }, { 'argument', 'any' } },
|
||||
@ -10256,7 +10256,7 @@ M.funcs = {
|
||||
You can also change the type of a register by appending
|
||||
nothing: >vim
|
||||
call setreg('a', '', 'al')
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'setreg',
|
||||
params = { { 'regname', 'string' }, { 'value', 'any' }, { 'options', 'string' } },
|
||||
@ -10356,7 +10356,7 @@ M.funcs = {
|
||||
Examples: >vim
|
||||
call setwinvar(1, "&list", 0)
|
||||
call setwinvar(2, "myvar", "foobar")
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'setwinvar',
|
||||
params = { { 'nr', 'integer' }, { 'varname', 'string' }, { 'val', 'any' } },
|
||||
@ -10861,7 +10861,7 @@ M.funcs = {
|
||||
|
||||
" Remove all the placed signs from all the buffers
|
||||
call sign_unplace('*')
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'sign_unplace',
|
||||
params = { { 'group', 'string' }, { 'dict', 'vim.fn.sign_unplace.dict' } },
|
||||
@ -11572,7 +11572,7 @@ M.funcs = {
|
||||
echo strftime("%H:%M") " 11:55
|
||||
echo strftime("%c", getftime("file.c"))
|
||||
" Show mod time of file.c.
|
||||
|
||||
<
|
||||
]=],
|
||||
name = 'strftime',
|
||||
params = { { 'format', 'string' }, { 'time', 'number' } },
|
||||
@ -11961,6 +11961,7 @@ M.funcs = {
|
||||
let &directory = '.'
|
||||
let swapfiles = swapfilelist()
|
||||
let &directory = save_dir
|
||||
<
|
||||
]=],
|
||||
name = 'swapfilelist',
|
||||
params = {},
|
||||
|
Reference in New Issue
Block a user