mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 06:45:37 +00:00
docs: api, messages, lsp, trust
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features.
This commit is contained in:
@@ -445,15 +445,15 @@ do
|
||||
end, { expr = true, desc = 'Add empty line below cursor' })
|
||||
end
|
||||
|
||||
--- incremental treesitter selection mappings (+ lsp fallback)
|
||||
--- "Incremental selection" mappings (treesitter + LSP fallback).
|
||||
do
|
||||
vim.keymap.set({ 'x' }, '[n', function()
|
||||
require 'vim.treesitter._select'.select_prev(vim.v.count1)
|
||||
end, { desc = 'Select previous treesitter node' })
|
||||
end, { desc = 'Select previous node' })
|
||||
|
||||
vim.keymap.set({ 'x' }, ']n', function()
|
||||
require 'vim.treesitter._select'.select_next(vim.v.count1)
|
||||
end, { desc = 'Select next treesitter node' })
|
||||
end, { desc = 'Select next node' })
|
||||
|
||||
vim.keymap.set({ 'x', 'o' }, 'an', function()
|
||||
if vim.treesitter.get_parser(nil, nil, { error = false }) then
|
||||
@@ -461,7 +461,7 @@ do
|
||||
else
|
||||
vim.lsp.buf.selection_range(vim.v.count1)
|
||||
end
|
||||
end, { desc = 'Select parent treesitter node or outer incremental lsp selections' })
|
||||
end, { desc = 'Select parent (outer) node' })
|
||||
|
||||
vim.keymap.set({ 'x', 'o' }, 'in', function()
|
||||
if vim.treesitter.get_parser(nil, nil, { error = false }) then
|
||||
@@ -469,7 +469,7 @@ do
|
||||
else
|
||||
vim.lsp.buf.selection_range(-vim.v.count1)
|
||||
end
|
||||
end, { desc = 'Select child treesitter node or inner incremental lsp selections' })
|
||||
end, { desc = 'Select child (inner) node' })
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ local function key_fn(v, key)
|
||||
return key and key(v) or v
|
||||
end
|
||||
|
||||
--- Removes duplicate values from a list-like table in-place.
|
||||
--- Removes duplicate values from a |lua-list| in-place.
|
||||
---
|
||||
--- Only the first occurrence of each value is kept.
|
||||
--- The operation is performed in-place and the input table is modified.
|
||||
@@ -383,6 +383,7 @@ end
|
||||
--- -- t is now { {id=1}, {id=2} }
|
||||
--- ```
|
||||
---
|
||||
--- @since 14
|
||||
--- @generic T
|
||||
--- @param t T[]
|
||||
--- @param key? fun(x: T): any Optional hash function to determine uniqueness of values
|
||||
@@ -482,8 +483,8 @@ local function upper_bound(t, val, lo, hi, key)
|
||||
return lo
|
||||
end
|
||||
|
||||
--- Search for a position in a sorted list {t}
|
||||
--- where {val} can be inserted while keeping the list sorted.
|
||||
--- Search for a position in a sorted |lua-list| {t} where {val} can be inserted while keeping the
|
||||
--- list sorted.
|
||||
---
|
||||
--- Use {bound} to determine whether to return the first or the last position,
|
||||
--- defaults to "lower", i.e., the first position.
|
||||
@@ -514,6 +515,7 @@ end
|
||||
--- print(t[i]) -- { 3, 3, 3 }
|
||||
--- end
|
||||
--- ```
|
||||
---@since 14
|
||||
---@generic T
|
||||
---@param t T[] A comparable list.
|
||||
---@param val T The value to search.
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
--- ---@type 'cmd'|'msg' Default message target, either in the
|
||||
--- ---cmdline or in a separate ephemeral message window.
|
||||
--- ---@type string|table<string, 'cmd'|'msg'|'pager'> Default message target
|
||||
--- or table mapping |ui-messages| kinds and triggers to a target.
|
||||
--- ---or table mapping |ui-messages| kinds and triggers to a target.
|
||||
--- targets = 'cmd',
|
||||
--- timeout = 4000, -- Time a message is visible in the message window.
|
||||
--- },
|
||||
@@ -32,7 +32,9 @@
|
||||
---
|
||||
---Rather than a |hit-enter-prompt|, messages shown in the cmdline area that do
|
||||
---not fit are appended with a `[+x]` "spill" indicator, where `x` indicates the
|
||||
---spilled lines. To see the full message, the |g<| command can be used.
|
||||
---spilled lines. To see the full message, use either:
|
||||
--- - ENTER immediately after a message from interactive |:| cmdline.
|
||||
--- - |g<| at any time.
|
||||
|
||||
local api = vim.api
|
||||
local M = {
|
||||
|
||||
Reference in New Issue
Block a user