docs: small fixes (#35791)

Close #34938
Close #35030
Close #35233
Close #35259
Close #35290
Close #35433
Close #35541
Close #35766
Close #35792

Co-authored-by: huylg <45591413+huylg@users.noreply.github.com>
Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com>
Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com>
Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com>
Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com>
Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com>
Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com>
Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com>
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
This commit is contained in:
zeertzjq
2025-09-16 11:41:36 +08:00
committed by GitHub
parent e7ff132708
commit ff777f9a85
27 changed files with 40 additions and 43 deletions

View File

@@ -295,14 +295,14 @@ cmake --build build
In case you are not using Alpine Linux you can use a container to do the build the binary: In case you are not using Alpine Linux you can use a container to do the build the binary:
```bash ```sh
podman run \ podman run \
--rm \ --rm \
-it \ -it \
-v "$PWD:/workdir" \ -v "$PWD:/workdir" \
-w /workdir \ -w /workdir \
alpine:latest \ alpine:latest \
bash -c 'apk add build-base cmake coreutils curl gettext-tiny-dev git && make CMAKE_EXTRA_FLAGS="-DSTATIC_BUILD=1"' sh -c 'apk add build-base cmake coreutils curl gettext-tiny-dev git && make CMAKE_EXTRA_FLAGS="-DSTATIC_BUILD=1"'
``` ```
The resulting binary in `build/bin/nvim` will have all the dependencies statically linked: The resulting binary in `build/bin/nvim` will have all the dependencies statically linked:

View File

@@ -111,7 +111,7 @@ The [Releases](https://github.com/neovim/neovim/releases) page provides pre-buil
```sh ```sh
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim sudo rm -rf /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
``` ```

View File

@@ -15,7 +15,7 @@ Neovim is a project that seeks to aggressively refactor [Vim](https://www.vim.or
- Simplify maintenance and encourage [contributions](CONTRIBUTING.md) - Simplify maintenance and encourage [contributions](CONTRIBUTING.md)
- Split the work between multiple developers - Split the work between multiple developers
- Enable [advanced UIs] without modifications to the core - Enable [advanced UIs] without modifications to the core
- Maximize [extensibility](https://neovim.io/doc/user/ui.html) - Maximize [extensibility](https://neovim.io/doc/user/api-ui-events.html#api-ui-events)
See the [Introduction](https://github.com/neovim/neovim/wiki/Introduction) wiki page and [Roadmap] See the [Introduction](https://github.com/neovim/neovim/wiki/Introduction) wiki page and [Roadmap]
for more information. for more information.

View File

@@ -880,7 +880,7 @@ must handle.
True if the message was added to the |:messages| history. True if the message was added to the |:messages| history.
append append
True if the message should be appeneded to the previous message, True if the message should be appended to the previous message,
rather than started on a new line. Is set for |:echon|. rather than started on a new line. Is set for |:echon|.
msg_id msg_id

View File

@@ -338,7 +338,7 @@ hard to see what the actual edit on it was. You can use diff anchors to pin
that function so the diff algorithm will align based on it. that function so the diff algorithm will align based on it.
To use it, set anchors using 'diffanchors' which is a comma-separated list of To use it, set anchors using 'diffanchors' which is a comma-separated list of
{address} in each file, and then add "anchor" to 'diffopt'. Internaly, Vim {address} in each file, and then add "anchor" to 'diffopt'. Internally, Vim
splits each file up into sections split by the anchors. It performs the diff splits each file up into sections split by the anchors. It performs the diff
on each pair of sections separately before merging the results back. on each pair of sections separately before merging the results back.

View File

@@ -282,9 +282,6 @@ nostop like start, except CTRL-W and CTRL-U do not stop at the start of
When 'backspace' is empty, Vi compatible backspacing is used. You cannot When 'backspace' is empty, Vi compatible backspacing is used. You cannot
backspace over autoindent, before column 1 or before where insert started. backspace over autoindent, before column 1 or before where insert started.
For backwards compatibility the values "0", "1", "2" and "3" are also allowed,
see 'backspace'.
If the 'backspace' option does contain "eol" and the cursor is in column 1 If the 'backspace' option does contain "eol" and the cursor is in column 1
when one of the three keys is used, the current line is joined with the when one of the three keys is used, the current line is joined with the
previous line. This effectively deletes the <EOL> in front of the cursor. previous line. This effectively deletes the <EOL> in front of the cursor.

View File

@@ -3947,7 +3947,7 @@ vim.net.request({url}, {opts}, {on_response}) *vim.net.request()*
This function operates in one mode: This function operates in one mode:
• Asynchronous (non-blocking): Returns immediately and passes the response • Asynchronous (non-blocking): Returns immediately and passes the response
object to the provided `on_response` handler on completetion. object to the provided `on_response` handler on completion.
Parameters: ~ Parameters: ~
• {url} (`string`) The URL for the request. • {url} (`string`) The URL for the request.
@@ -3960,7 +3960,7 @@ vim.net.request({url}, {opts}, {on_response}) *vim.net.request()*
Response Object will be `true` instead of the Response Object will be `true` instead of the
response body. response body.
• {on_response} (`fun(err?: string, response?: { body: string|boolean })`) • {on_response} (`fun(err?: string, response?: { body: string|boolean })`)
Callback invoked on request completetion. The `body` Callback invoked on request completion. The `body`
field in the response object contains the raw response field in the response object contains the raw response
data (text or binary). Called with (err, nil) on data (text or binary). Called with (err, nil) on
failure, or (nil, { body = string|boolean }) on failure, or (nil, { body = string|boolean }) on
@@ -4421,7 +4421,7 @@ vim.snippet.jump({direction}) *vim.snippet.jump()*
else else
return '<Tab>' return '<Tab>'
end end
end, { descr = '...', expr = true, silent = true }) end, { desc = '...', expr = true, silent = true })
< <
Parameters: ~ Parameters: ~
@@ -4621,7 +4621,7 @@ vim.system({cmd}, {opts}, {on_exit}) *vim.system()*
return of SystemObj:wait(). return of SystemObj:wait().
Overloads: ~ Overloads: ~
• `fun(cmd: string, on_exit: fun(out: vim.SystemCompleted)): vim.SystemObj` • `fun(cmd: string[], on_exit: fun(out: vim.SystemCompleted)): vim.SystemObj`
Return: ~ Return: ~
(`vim.SystemObj`) See |vim.SystemObj|. (`vim.SystemObj`) See |vim.SystemObj|.

View File

@@ -77,7 +77,7 @@ EVENTS
• |ui-messages| no longer emits the `msg_show.return_prompt`, and • |ui-messages| no longer emits the `msg_show.return_prompt`, and
`msg_history_clear` events. The `msg_clear` event was repurposed and is now `msg_history_clear` events. The `msg_clear` event was repurposed and is now
emitted after the screen is cleared. These events arbitrarily assumed a emitted after the screen is cleared. These events arbitrarily assumed a
message UI that mimicks the legacy message grid. Benefit: reduced UI event message UI that mimics the legacy message grid. Benefit: reduced UI event
traffic and more flexibility for UIs. traffic and more flexibility for UIs.
The `msg_history_show` event has an additional "prev_cmd" argument. The `msg_history_show` event has an additional "prev_cmd" argument.
• A new `empty` message kind is emitted for an empty (e.g. `:echo ""`) message. • A new `empty` message kind is emitted for an empty (e.g. `:echo ""`) message.
@@ -201,8 +201,8 @@ EVENTS
• |CmdlineLeave| sets |v:char| to the character that stops the Cmdline mode. • |CmdlineLeave| sets |v:char| to the character that stops the Cmdline mode.
• |CmdlineLeavePre| triggered before preparing to leave the command line. • |CmdlineLeavePre| triggered before preparing to leave the command line.
• New `append` paremeter for |ui-messages| `msg_show` event. • New `append` parameter for |ui-messages| `msg_show` event.
• New `msg_id` paremeter for |ui-messages| `msg_show` event. • New `msg_id` parameter for |ui-messages| `msg_show` event.
• 'rulerformat' is emitted as `msg_ruler` when not part of the statusline. • 'rulerformat' is emitted as `msg_ruler` when not part of the statusline.
• Creating or updating a progress message with |nvim_echo()| triggers a |Progress| event. • Creating or updating a progress message with |nvim_echo()| triggers a |Progress| event.
@@ -282,7 +282,7 @@ OPTIONS
• "F" complete using 'completefunc' • "F" complete using 'completefunc'
• "o" complete using 'omnifunc' • "o" complete using 'omnifunc'
• 'complete' allows limiting matches for sources using "{flag}^<limit>". • 'complete' allows limiting matches for sources using "{flag}^<limit>".
• 'completeopt' flag "nearset" sorts completion results by distance to cursor. • 'completeopt' flag "nearest" sorts completion results by distance to cursor.
• 'diffanchors' specifies addresses to anchor a diff. • 'diffanchors' specifies addresses to anchor a diff.
• 'diffopt' `inline:` configures diff highlighting for changes within a line. • 'diffopt' `inline:` configures diff highlighting for changes within a line.
• 'grepformat' is now a |global-local| option. • 'grepformat' is now a |global-local| option.

View File

@@ -2161,7 +2161,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Each anchor line splits the buffer (the split happens above the Each anchor line splits the buffer (the split happens above the
anchor), with each part being diff'ed separately before the final anchor), with each part being diff'ed separately before the final
result is joined. When more than one {address} are provided, the result is joined. When more than one {address} are provided, the
anchors will be sorted interally by line number. If using buffer anchors will be sorted internally by line number. If using buffer
local options, each buffer should have the same number of anchors local options, each buffer should have the same number of anchors
(extra anchors will be ignored). This option is only used when (extra anchors will be ignored). This option is only used when
'diffopt' has "anchor" set. See |diff-anchors| for more details and 'diffopt' has "anchor" set. See |diff-anchors| for more details and

View File

@@ -192,7 +192,7 @@ registers. Nvim supports these clipboard tools, in order of priority:
- "win32yank" : *win32yank* (Windows) - "win32yank" : *win32yank* (Windows)
- "putclip" : putclip, getclip (Windows) https://cygwin.com/packages/summary/cygutils.html - "putclip" : putclip, getclip (Windows) https://cygwin.com/packages/summary/cygutils.html
- "clip" : clip, powershell (Windows) https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/clip - "clip" : clip, powershell (Windows) https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/clip
- "termux" : termux (via termux-clipboard-set, termux-clipboard-set) - "termux" : termux (via termux-clipboard-set, termux-clipboard-get)
- "tmux" : tmux (if $TMUX is set) - "tmux" : tmux (if $TMUX is set)
- "osc52" : |clipboard-osc52| (if supported by your terminal) - "osc52" : |clipboard-osc52| (if supported by your terminal)

View File

@@ -3430,7 +3430,7 @@ getcmdtype() *getcmdtype()*
Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|. Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
Return: ~ Return: ~
(`':'|'>'|'/'|'?'|'@'|'-'|'='`) (`':'|'>'|'/'|'?'|'@'|'-'|'='|''`)
getcmdwintype() *getcmdwintype()* getcmdwintype() *getcmdwintype()*
Return the current |command-line-window| type. Possible return Return the current |command-line-window| type. Possible return
@@ -3438,7 +3438,7 @@ getcmdwintype() *getcmdwintype()*
when not in the command-line window. when not in the command-line window.
Return: ~ Return: ~
(`':'|'>'|'/'|'?'|'@'|'-'|'='`) (`':'|'>'|'/'|'?'|'@'|'-'|'='|''`)
getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
Return a list of command-line completion matches. The String Return a list of command-line completion matches. The String

View File

@@ -1771,7 +1771,7 @@ vim.wo.diff = vim.o.diff
--- Each anchor line splits the buffer (the split happens above the --- Each anchor line splits the buffer (the split happens above the
--- anchor), with each part being diff'ed separately before the final --- anchor), with each part being diff'ed separately before the final
--- result is joined. When more than one {address} are provided, the --- result is joined. When more than one {address} are provided, the
--- anchors will be sorted interally by line number. If using buffer --- anchors will be sorted internally by line number. If using buffer
--- local options, each buffer should have the same number of anchors --- local options, each buffer should have the same number of anchors
--- (extra anchors will be ignored). This option is only used when --- (extra anchors will be ignored). This option is only used when
--- 'diffopt' has "anchor" set. See `diff-anchors` for more details and --- 'diffopt' has "anchor" set. See `diff-anchors` for more details and

View File

@@ -3075,14 +3075,14 @@ function vim.fn.getcmdscreenpos() end
--- Returns an empty string otherwise. --- Returns an empty string otherwise.
--- Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|. --- Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
--- ---
--- @return ':'|'>'|'/'|'?'|'@'|'-'|'=' --- @return ':'|'>'|'/'|'?'|'@'|'-'|'='|''
function vim.fn.getcmdtype() end function vim.fn.getcmdtype() end
--- Return the current |command-line-window| type. Possible return --- Return the current |command-line-window| type. Possible return
--- values are the same as |getcmdtype()|. Returns an empty string --- values are the same as |getcmdtype()|. Returns an empty string
--- when not in the command-line window. --- when not in the command-line window.
--- ---
--- @return ':'|'>'|'/'|'?'|'@'|'-'|'=' --- @return ':'|'>'|'/'|'?'|'@'|'-'|'='|''
function vim.fn.getcmdwintype() end function vim.fn.getcmdwintype() end
--- Return a list of command-line completion matches. The String --- Return a list of command-line completion matches. The String

View File

@@ -503,7 +503,7 @@ end
--- asynchronously. See return of SystemObj:wait(). --- asynchronously. See return of SystemObj:wait().
--- ---
--- @return vim.SystemObj --- @return vim.SystemObj
--- @overload fun(cmd: string, on_exit: fun(out: vim.SystemCompleted)): vim.SystemObj --- @overload fun(cmd: string[], on_exit: fun(out: vim.SystemCompleted)): vim.SystemObj
function vim.system(cmd, opts, on_exit) function vim.system(cmd, opts, on_exit)
if type(opts) == 'function' then if type(opts) == 'function' then
on_exit = opts on_exit = opts

View File

@@ -1446,7 +1446,7 @@ function M.selection_range(direction)
if not response then if not response then
return return
end end
-- We only requested one range, thus we get the first and only reponse here. -- We only requested one range, thus we get the first and only response here.
response = response[1] response = response[1]
local ranges = {} ---@type lsp.Range[] local ranges = {} ---@type lsp.Range[]
local lines = api.nvim_buf_get_lines(0, 0, -1, false) local lines = api.nvim_buf_get_lines(0, 0, -1, false)

View File

@@ -4,7 +4,7 @@ local M = {}
--- ---
--- This function operates in one mode: --- This function operates in one mode:
--- - Asynchronous (non-blocking): Returns immediately and passes the response object to the --- - Asynchronous (non-blocking): Returns immediately and passes the response object to the
--- provided `on_response` handler on completetion. --- provided `on_response` handler on completion.
--- ---
--- @param url string The URL for the request. --- @param url string The URL for the request.
--- @param opts? table Optional parameters: --- @param opts? table Optional parameters:
@@ -12,7 +12,7 @@ local M = {}
--- - `retry` (integer|nil): Number of retries on transient failures (default: 3). --- - `retry` (integer|nil): Number of retries on transient failures (default: 3).
--- - `outpath` (string|nil): File path to save the response body to. If set, the `body` value in the Response Object will be `true` instead of the response body. --- - `outpath` (string|nil): File path to save the response body to. If set, the `body` value in the Response Object will be `true` instead of the response body.
--- @param on_response fun(err?: string, response?: { body: string|boolean }) Callback invoked on request --- @param on_response fun(err?: string, response?: { body: string|boolean }) Callback invoked on request
--- completetion. The `body` field in the response object contains the raw response data (text or binary). --- completion. The `body` field in the response object contains the raw response data (text or binary).
--- Called with (err, nil) on failure, or (nil, { body = string|boolean }) on success. --- Called with (err, nil) on failure, or (nil, { body = string|boolean }) on success.
function M.request(url, opts, on_response) function M.request(url, opts, on_response)
vim.validate({ vim.validate({

View File

@@ -613,7 +613,7 @@ end
--- else --- else
--- return '<Tab>' --- return '<Tab>'
--- end --- end
--- end, { descr = '...', expr = true, silent = true }) --- end, { desc = '...', expr = true, silent = true })
--- ``` --- ```
--- ---
--- @param direction (vim.snippet.Direction) Navigation direction. -1 for previous, 1 for next. --- @param direction (vim.snippet.Direction) Navigation direction. -1 for previous, 1 for next.

View File

@@ -3854,7 +3854,7 @@ M.funcs = {
]=], ]=],
name = 'getcmdtype', name = 'getcmdtype',
params = {}, params = {},
returns = "':'|'>'|'/'|'?'|'@'|'-'|'='", returns = "':'|'>'|'/'|'?'|'@'|'-'|'='|''",
signature = 'getcmdtype()', signature = 'getcmdtype()',
}, },
getcmdwintype = { getcmdwintype = {
@@ -3865,7 +3865,7 @@ M.funcs = {
]=], ]=],
name = 'getcmdwintype', name = 'getcmdwintype',
params = {}, params = {},
returns = "':'|'>'|'/'|'?'|'@'|'-'|'='", returns = "':'|'>'|'/'|'?'|'@'|'-'|'='|''",
signature = 'getcmdwintype()', signature = 'getcmdwintype()',
}, },
getcompletion = { getcompletion = {

View File

@@ -3026,7 +3026,7 @@ int set_cpt_callbacks(optset_T *args)
} }
} }
if (!local) { // ':set' used insted of ':setlocal' if (!local) { // ':set' used instead of ':setlocal'
// Cache the callback array // Cache the callback array
copy_cpt_callbacks(&cpt_cb, &cpt_cb_count, curbuf->b_p_cpt_cb, copy_cpt_callbacks(&cpt_cb, &cpt_cb_count, curbuf->b_p_cpt_cb,
curbuf->b_p_cpt_count); curbuf->b_p_cpt_count);

View File

@@ -42,7 +42,7 @@ typedef enum {
kRetNilBool, ///< NIL preserved as such, other values return their booleanness kRetNilBool, ///< NIL preserved as such, other values return their booleanness
///< Should also be used when return value is ignored, as it is allocation-free ///< Should also be used when return value is ignored, as it is allocation-free
kRetLuaref, ///< return value becomes a single Luaref, regardless of type (except NIL) kRetLuaref, ///< return value becomes a single Luaref, regardless of type (except NIL)
kRetMulti, ///< like kRetObject but return muliple return values as an Array kRetMulti, ///< like kRetObject but return multiple return values as an Array
} LuaRetMode; } LuaRetMode;
/// Maximum number of errors in vim.ui_attach() and decor provider callbacks. /// Maximum number of errors in vim.ui_attach() and decor provider callbacks.

View File

@@ -3290,7 +3290,7 @@ void msg_ext_ui_flush(void)
ui_call_msg_show(cstr_as_string(msg_ext_kind), *tofree, msg_ext_overwrite, msg_ext_history, ui_call_msg_show(cstr_as_string(msg_ext_kind), *tofree, msg_ext_overwrite, msg_ext_history,
msg_ext_append, msg_ext_id); msg_ext_append, msg_ext_id);
// clear info after emiting message. // clear info after emitting message.
if (msg_ext_history) { if (msg_ext_history) {
api_free_array(*tofree); api_free_array(*tofree);
} else { } else {

View File

@@ -2334,7 +2334,7 @@ local options = {
Each anchor line splits the buffer (the split happens above the Each anchor line splits the buffer (the split happens above the
anchor), with each part being diff'ed separately before the final anchor), with each part being diff'ed separately before the final
result is joined. When more than one {address} are provided, the result is joined. When more than one {address} are provided, the
anchors will be sorted interally by line number. If using buffer anchors will be sorted internally by line number. If using buffer
local options, each buffer should have the same number of anchors local options, each buffer should have the same number of anchors
(extra anchors will be ignored). This option is only used when (extra anchors will be ignored). This option is only used when
'diffopt' has "anchor" set. See |diff-anchors| for more details and 'diffopt' has "anchor" set. See |diff-anchors| for more details and

View File

@@ -86,7 +86,7 @@ describe('insert-mode', function()
it('inserts named/clipboard registers literally', function() it('inserts named/clipboard registers literally', function()
local screen = Screen.new(50, 6) local screen = Screen.new(50, 6)
-- regular text without special charecter command -- regular text without special character command
command('let @a = "test"') command('let @a = "test"')
feed('i<C-R>a<ESC>') feed('i<C-R>a<ESC>')
screen:expect([[ screen:expect([[

View File

@@ -272,7 +272,7 @@ describe('prompt buffer', function()
eq('line 1\nline 2\nline 3', fn('prompt_getinput', buf)) eq('line 1\nline 2\nline 3', fn('prompt_getinput', buf))
feed('<cr>') feed('<cr>')
-- submiting multiline text works -- submitting multiline text works
screen:expect([[ screen:expect([[
Result: "line 1 | Result: "line 1 |
line 2 | line 2 |
@@ -396,7 +396,7 @@ describe('prompt buffer', function()
source_script() source_script()
local buf = api.nvim_get_current_buf() local buf = api.nvim_get_current_buf()
-- text editiing alowed in current prompt -- text editing allowed in current prompt
feed('tests-initial<esc>') feed('tests-initial<esc>')
feed('bimiddle-<esc>') feed('bimiddle-<esc>')
screen:expect([[ screen:expect([[

View File

@@ -5135,7 +5135,7 @@ func Test_nonkeyword_trigger()
call assert_equal('a#', getline('.')) call assert_equal('a#', getline('.'))
set completeopt& set completeopt&
" Test 2: Filter nonkeyword and keyword matches with differet startpos " Test 2: Filter nonkeyword and keyword matches with different startpos
set completeopt+=menuone,noselect set completeopt+=menuone,noselect
call feedkeys("S#a\<C-N>b\<F2>\<F3>\<Esc>0", 'tx!') call feedkeys("S#a\<C-N>b\<F2>\<F3>\<Esc>0", 'tx!')
call assert_equal(['abc', 'abcd', '#abar'], b:matches->mapnew('v:val.word')) call assert_equal(['abc', 'abcd', '#abar'], b:matches->mapnew('v:val.word'))
@@ -5256,7 +5256,7 @@ func Test_autocomplete_trigger()
call assert_equal(2, g:CallCount) call assert_equal(2, g:CallCount)
call assert_equal('a#', getline('.')) call assert_equal('a#', getline('.'))
" Test 2: Filter nonkeyword and keyword matches with differet startpos " Test 2: Filter nonkeyword and keyword matches with different startpos
for fuzzy in range(2) for fuzzy in range(2)
if fuzzy if fuzzy
set completeopt+=fuzzy set completeopt+=fuzzy