- Also delete old perl scripts which are not used since 8+ years ago.

fix #23251
fix #27367
ref https://github.com/neovim/neovim/issues/2252#issuecomment-1902662577

Helped-by: Daniel Kongsgaard <dakongsgaard@gmail.com>
Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
This commit is contained in:
Justin M. Keyes
2024-04-30 04:30:21 -07:00
committed by GitHub
parent efaf37a2b9
commit 71cf75f96a
25 changed files with 218 additions and 344 deletions

View File

@@ -255,7 +255,7 @@ do
vim.api.nvim_create_autocmd('TermRequest', {
group = nvim_terminal_augroup,
desc = 'Respond to OSC foreground/background color requests',
desc = 'Handles OSC foreground/background color requests',
callback = function(args)
--- @type integer
local channel = vim.bo[args.buf].channel

View File

@@ -897,8 +897,8 @@ function vim.api.nvim_create_augroup(name, opts) end
--- • callback (function|string) optional: Lua function (or
--- Vimscript function name, if string) called when the event(s)
--- is triggered. Lua callback can return a truthy value (not
--- `false` or `nil`) to delete the autocommand. Receives a
--- table argument with these keys:
--- `false` or `nil`) to delete the autocommand. Receives one
--- argument, a table with these keys: *event-args*
--- • id: (number) autocommand id
--- • event: (string) name of the triggered event
--- `autocmd-events`
@@ -907,7 +907,7 @@ function vim.api.nvim_create_augroup(name, opts) end
--- • buf: (number) expanded value of <abuf>
--- • file: (string) expanded value of <afile>
--- • data: (any) arbitrary data passed from
--- `nvim_exec_autocmds()`
--- `nvim_exec_autocmds()` *event-data*
--- • command (string) optional: Vim command to execute on event.
--- Cannot be used with {callback}
--- • once (boolean) optional: defaults to false. Run the

View File

@@ -7446,6 +7446,7 @@ vim.bo.vts = vim.bo.vartabstop
---
--- Level Messages ~
--- ----------------------------------------------------------------------
--- 1 Enables Lua tracing (see above). Does not produce messages.
--- 2 When a file is ":source"'ed, or `shada` file is read or written.
--- 3 UI info, terminal capabilities.
--- 4 Shell commands.

View File

@@ -1,26 +1,3 @@
---@brief
---
--- Nvim includes a function for highlighting a selection on yank.
---
--- To enable it, add the following to your `init.vim`:
---
--- ```vim
--- au TextYankPost * silent! lua vim.highlight.on_yank()
--- ```
---
--- You can customize the highlight group and the duration of the highlight via:
---
--- ```vim
--- au TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=150}
--- ```
---
--- If you want to exclude visual selections from highlighting on yank, use:
---
--- ```vim
--- au TextYankPost * silent! lua vim.highlight.on_yank {on_visual=false}
--- ```
---
local api = vim.api
local M = {}
@@ -97,7 +74,13 @@ local yank_ns = api.nvim_create_namespace('hlyank')
local yank_timer --- @type uv.uv_timer_t?
local yank_cancel --- @type fun()?
--- Highlight the yanked text
--- Highlight the yanked text during a |TextYankPost| event.
---
--- Add the following to your `init.vim`:
---
--- ```vim
--- autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup='Visual', timeout=300}
--- ```
---
--- @param opts table|nil Optional parameters
--- - higroup highlight group for yanked region (default "IncSearch")

View File

@@ -450,20 +450,24 @@ function Iter:join(delim)
return table.concat(self:totable(), delim)
end
--- Folds ("reduces") an iterator into a single value.
--- Folds ("reduces") an iterator into a single value. [Iter:reduce()]()
---
--- Examples:
---
--- ```lua
--- -- Create a new table with only even values
--- local t = { a = 1, b = 2, c = 3, d = 4 }
--- local it = vim.iter(t)
--- it:filter(function(k, v) return v % 2 == 0 end)
--- it:fold({}, function(t, k, v)
--- t[k] = v
--- return t
--- end)
--- -- { b = 2, d = 4 }
--- vim.iter({ a = 1, b = 2, c = 3, d = 4 })
--- :filter(function(k, v) return v % 2 == 0 end)
--- :fold({}, function(acc, k, v)
--- acc[k] = v
--- return acc
--- end) --> { b = 2, d = 4 }
---
--- -- Get the "maximum" item of an iterable.
--- vim.iter({ -99, -4, 3, 42, 0, 0, 7 })
--- :fold({}, function(acc, v)
--- acc.max = math.max(v, acc.max or v) return acc
--- end) --> { max = 42 }
--- ```
---
---@generic A