This commit is contained in:
Justin M. Keyes
2026-04-25 11:16:18 -04:00
committed by GitHub
parent cb6c4cadf5
commit b70224e3bd
23 changed files with 183 additions and 89 deletions

View File

@@ -468,11 +468,11 @@ do
vim.keymap.set({ 'x' }, '[N', function()
require 'vim.treesitter._select'.select_grow_prev(vim.v.count1)
end, { desc = 'Select expand previous node' })
end, { desc = 'Select previous sibling node' })
vim.keymap.set({ 'x' }, ']N', function()
require 'vim.treesitter._select'.select_grow_next(vim.v.count1)
end, { desc = 'Select expand next node' })
end, { desc = 'Select next sibling node' })
vim.keymap.set({ 'x', 'o' }, 'an', function()
if vim.treesitter.get_parser(nil, nil, { error = false }) then
@@ -1002,7 +1002,7 @@ do
and os.getenv('NVIM_TEST') == nil
then
vim.notify(
"defaults.lua: Did not detect DSR response from terminal for 'background' detection. This results in a slower startup time. To disable this and other 'ttyfast' features during startup, set the environment variable NVIM_NOTTYFAST",
"E1568: Terminal did not respond to DSR request for 'background' color. Startup may be slower. :help 'ttyfast'",
vim.log.levels.WARN,
{ _truncate = true }
)

View File

@@ -1,4 +1,6 @@
--- @meta
-- This file is NOT generated, edit it directly.
error('Cannot require a meta file')
--- @alias elem_or_list<T> T|T[]

View File

@@ -5516,6 +5516,12 @@ vim.go.so = vim.go.scrolloff
--- For a window-local value, -1 means to use the global value.
--- Values below -1 are invalid.
---
--- Example:
---
--- ```vim
--- :set scrolloff=99 scrolloffpad=1
--- ```
---
--- After using the local value, go back the global value with one of
--- these two:
---
@@ -7555,12 +7561,20 @@ vim.o.ttm = vim.o.ttimeoutlen
vim.go.ttimeoutlen = vim.o.ttimeoutlen
vim.go.ttm = vim.go.ttimeoutlen
--- Assume that the underlying terminal can respond quickly to queries
--- required by features such as 'background' detection.
--- Enables Nvim `TUI` features which assume a fast (usually local) host
--- terminal. During startup, Nvim queries the terminal (for 'background'
--- detection, etc.) and must wait for a response (or timeout).
---
--- Nvim issues terminal queries before reading the user's `config` file,
--- so disabling this option there will not work. Set $NVIM_NOTTYFAST
--- before starting Nvim to disable terminal queries.
--- If your terminal environment is slow (e.g. remote SSH), or broken
--- (doesn't respond to queries), Nvim startup may be slower. Therefore
--- you can disable this option by setting the `$NVIM_NOTTYFAST`
--- environment variable before starting Nvim:
--- ```
--- NVIM_NOTTYFAST=1 nvim
--- ```
---
--- The queries are performed early, before `--cmd` and user `config`, so
--- `:set nottyfast` in your config happens too late.
---
--- @type boolean
vim.o.ttyfast = true

View File

@@ -11273,15 +11273,18 @@ function vim.fn.winwidth(nr) end
--- @return any
function vim.fn.wordcount() end
--- When {object} is a |List| write it to file {fname}. Each list
--- item is separated with a NL. Each list item must be a String
--- or Number.
--- All NL characters are replaced with a NUL character.
--- Inserting CR characters needs to be done before passing {list}
--- to writefile().
--- Writes {data} to file {fname}.
---
--- When {object} is a |Blob| write the bytes to file {fname}
--- unmodified, also when binary mode is not specified.
--- - When {data} is a |Blob| its bytes are written unmodified
--- (even if binary mode "b" is not specified).
--- - When {data} is a Lua string, it is treated as a blob.
--- - When {data} is a |List|, each list item is treated as a text
--- line (terminated with a newline). Each list item must be
--- a String or Number.
--- - Any NL (newline) chars in the line are treated as a NUL
--- character. (This is a workaround to allow Vimscript to
--- write binary data, and is irrelevant for Lua, which should
--- just pass a string instead.)
---
--- {flags} must be a String. These characters are recognized:
---
@@ -11319,11 +11322,11 @@ function vim.fn.wordcount() end
--- call writefile(fl, "foocopy", "b")
--- <
---
--- @param object any
--- @param data any
--- @param fname string
--- @param flags? string
--- @return any
function vim.fn.writefile(object, fname, flags) end
function vim.fn.writefile(data, fname, flags) end
--- Bitwise XOR on the two arguments. The arguments are converted
--- to a number. A List, Dict or Float argument causes an error.

View File

@@ -30,6 +30,15 @@
--- ```lua
--- vim.print(vim.fn.readblob('.git/config'))
--- ```
---
--- [vim.fs.write()]()
---
--- You can use |writefile()| to write a file without explicitly opening/closing it.
---
--- Example:
--- ```lua
--- vim.fn.writefile('foo\0bar', 'data.bin', 'b')
--- ```
local uv = vim.uv