docs: misc

This commit is contained in:
Justin M. Keyes
2026-03-18 23:53:55 +01:00
parent cd71221250
commit e3a1e47bb2
18 changed files with 45 additions and 42 deletions

View File

@@ -1256,7 +1256,7 @@ end
--- Defaults to "Nvim".
---@param backtrace boolean|nil Prints backtrace. Defaults to true.
---
---@return string|nil # Deprecated message, or nil if no message was shown.
---@return string|nil # Deprecation message, or nil if no message was shown.
function vim.deprecate(name, alternative, version, plugin, backtrace)
plugin = plugin or 'Nvim'
if plugin == 'Nvim' then

View File

@@ -9717,7 +9717,7 @@ function vim.fn.stridx(haystack, needle, start) end
--- parsed back with |eval()|.
---
--- {expr} type result ~
--- String 'string'
--- String "string"
--- Number 123
--- Float 123.123456 or 1.123456e8 or
--- `str2float('inf')`

View File

@@ -423,7 +423,11 @@ end
--- Get LSP configs.
---
--- Note: Will eagerly evaluate config files in `'runtimepath'` if necessary.
--- WARNING:
--- - May eagerly (prematurely!) evaluate config files in 'runtimepath'.
--- - Configs may be in a partial state if they have async properties such as `on_dir()`.
---
--- @since 14
--- @param filter? vim.lsp.get_configs.Filter
--- @return vim.lsp.Config[]: List of |vim.lsp.Config| objects
function lsp.get_configs(filter)

View File

@@ -3,8 +3,8 @@
error('Cannot require a meta file')
--- @brief A "treesitter node" represents one specific element of the parsed contents of a buffer,
--- which can be captured by a |Query| for, e.g., highlighting. It is a |userdata| reference to an
--- object held by the treesitter library.
--- which can be captured by a |treesitter-query| for, e.g., highlighting. It is a |userdata|
--- reference to an object held by the treesitter library.
---
--- An instance `TSNode` of a treesitter node supports the following methods.

View File

@@ -322,7 +322,7 @@ do
-- store progress events
local progress_group, progress_autocmd = nil, nil
---Initialize progress event listeners
--- Initialize Progress handlers.
local function progress_init()
progress_group = vim.api.nvim_create_augroup('nvim.ui.progress_status', { clear = true })
progress_autocmd = vim.api.nvim_create_autocmd('Progress', {
@@ -333,12 +333,8 @@ do
if not ev.data or not ev.data.id then
return
end
progress[ev.data.id] = {
id = ev.data.id,
title = ev.data.title,
status = ev.data.status,
percent = ev.data.percent or 0,
}
ev.data.percent = ev.data.percent or 0
progress[ev.data.id] = ev.data
-- Clear finished items
if
@@ -353,7 +349,7 @@ do
})
end
---Return statusline text summarizing progress messages.
--- Gets a status description summarizing currently running progress messages.
--- - If none: returns empty string
--- - If one running item: "title: 42%"
--- - If multiple running items: "Progress: N items AVG%"
@@ -379,11 +375,11 @@ do
end
end
--- Gets the status of currently running progress messages, in a format
--- convenient for inclusion in 'statusline'.
---@return string formatted text of progress status for statusline
--- Gets a status description summarizing currently running progress messages.
--- Convenient for inclusion in 'statusline'.
---
---@return string # Progress status
function M.progress_status()
-- Create progress event listener on first call
if progress_autocmd == nil then
progress_init()
end