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

@@ -405,7 +405,7 @@ do
vim.keymap.set('n', '[<C-T>', function()
-- count doesn't work with :ptprevious, must use range. See #30641.
cmd({ cmd = 'ptprevious', range = { vim.v.count1 } })
end, { desc = ' :ptprevious' })
end, { desc = ':ptprevious' })
vim.keymap.set('n', ']<C-T>', function()
-- count doesn't work with :ptnext, must use range. See #30641.

View File

@@ -1771,7 +1771,7 @@ vim.wo.diff = vim.o.diff
--- Each anchor line splits the buffer (the split happens above the
--- anchor), with each part being diff'ed separately before the final
--- 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
--- (extra anchors will be ignored). This option is only used when
--- '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.
--- Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
---
--- @return ':'|'>'|'/'|'?'|'@'|'-'|'='
--- @return ':'|'>'|'/'|'?'|'@'|'-'|'='|''
function vim.fn.getcmdtype() end
--- Return the current |command-line-window| type. Possible return
--- values are the same as |getcmdtype()|. Returns an empty string
--- when not in the command-line window.
---
--- @return ':'|'>'|'/'|'?'|'@'|'-'|'='
--- @return ':'|'>'|'/'|'?'|'@'|'-'|'='|''
function vim.fn.getcmdwintype() end
--- Return a list of command-line completion matches. The String

View File

@@ -503,7 +503,7 @@ end
--- asynchronously. See return of SystemObj:wait().
---
--- @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)
if type(opts) == 'function' then
on_exit = opts

View File

@@ -1446,7 +1446,7 @@ function M.selection_range(direction)
if not response then
return
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]
local ranges = {} ---@type lsp.Range[]
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:
--- - 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 opts? table Optional parameters:
@@ -12,7 +12,7 @@ local M = {}
--- - `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.
--- @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.
function M.request(url, opts, on_response)
vim.validate({

View File

@@ -22,7 +22,7 @@ local validate = vim.validate
---
--- -- Create a range from two positions.
--- local range1 = vim.range(pos1, pos2)
--- -- Or createa range from four integers representing start and end positions.
--- -- Or create a range from four integers representing start and end positions.
--- local range2 = vim.range(3, 5, 4, 0)
---
--- -- Because `vim.Range` is end exclusive, `range1` and `range2` both represent

View File

@@ -613,7 +613,7 @@ end
--- else
--- return '<Tab>'
--- 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.