mirror of
https://github.com/neovim/neovim.git
synced 2026-04-22 07:15:34 +00:00
docs: misc
This commit is contained in:
@@ -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
|
||||
|
||||
2
runtime/lua/vim/_meta/vimfn.lua
generated
2
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -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')`
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user