summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_core/defaults.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-24feat(tui): restore 'ttyfast' to control tty requests #38699Kyle1
Problem: When running nvim on a remote machine over SSH, if there is high ping, then bg detection may not complete in time. This results in a warning every time nvim is started. #38648 Solution: Restore 'ttyfast' option and allow it to control whether or not bg detection is performed. Because this is during startup and before any user config or commands, we use the environment variable `NVIM_NOTTYFAST` to allow disabling `ttyfast` during initialization.
2026-04-24feat(api): nvim_echo(percent=nil) means "unknown" progress #39029Peter Cardenas1
Problem: No way to signal "unknown" or "indeterminate" progress percentage. Solution: Treat percent=nil as "indeterminate" percent.
2026-04-22feat(treesitter): expand selection to sibling node #38938altermo1
Problem: Can't expand treesitter-incremental-selection to the next and previous sibling nodes. Solution: Pressing `]N` in visual mode will expand the selection to the next sibling node, and `[N` will do the same with the previous node.
2026-04-21feat(normal): normal-mode ZR does :restartJustin M. Keyes1
Make it a normal-mode command instead of a default mapping.
2026-04-21feat(defaults): map ZR to restartMike J. McGuirk1
Problem: No default mapping for :restart. Solution: Map to ZR in defaults. Closes: https://github.com/neovim/neovim/issues/38942
2026-04-15refactor: update usages of deprecated "buffer" param #39089Justin M. Keyes1
2026-04-09fix(messages): truncate warning messages only in display (#38901)zeertzjq1
For now, add a private "_truncate" flag to nvim_echo, using a truncation method similar to showmode().
2026-04-05feat(defaults): :Open without args opens current file #38776Olivia Kinnear1
Problem: Running `:Open` on an open buffer does not run `vim.ui.open()` on that file, requiring the user to type `:Open %`. This is inconsistent with most other vim commands which accept files, which default to the current buffer's file. Solution: Default to the current file when `:Open` is used without arguments.
2026-03-31fix(defaults): check for TUI on non-stdio channel on startup (#38581)zeertzjq1
2026-03-23refactor: rename termcap.lua -> tty.lua #38437Justin M. Keyes1
Problem: The `termcap.lua` module is too narrowly named. We may need a place for tty-related functionality in the future. https://github.com/neovim/neovim/pull/31399#discussion_r1882598297 Solution: This isn't a public/documented interface, so just rename it.
2026-03-21feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360skewb1k1
The `buffer` option remains functional but is now undocumented. Providing both will raise an error. Since providing `buf` was disallowed before, there is no code that will break due to using `buffer` alongside `buf`.
2026-03-19feat(defaults): map "grx" to vim.lsp.codelens.run() #37689Yi Ming1
Problem Unlike inlay hints, code lenses are closely related to running commands; a significant number of code lenses are used to execute a command (such as running tests). Therefore, it is necessary to provide a default mapping for them. Solution Add a new default mapping "grx" (mnemonic: "eXecute", like "gx").
2026-03-18docs: misc, terminalJustin M. Keyes1
Close #38319 Close #38348 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Barrett Ruth <br.barrettruth@gmail.com>
2026-03-18refactor(terminal): impl "[Process exited]" in Lua #38343Ayaan1
Problem: "[Process exited]" is implemented in C with anonymous namespace and users have no way to hide it. Solution: - Handle "TermClose" event in Lua. - User can delete the "nvim.terminal" augroup to avoid "[Process exited]".
2026-03-13refactor: rename _ensure_integer => _assert_integerJustin M. Keyes1
2026-03-12refactor: integer functions, optimize asserts #34112Lewis Russell1
refactor(lua): add integer coercion helpers Add vim._tointeger() and vim._ensure_integer(), including optional base support, and switch integer-only tonumber()/assert call sites in the Lua runtime to use them. This also cleans up related integer parsing in LSP, health, loader, URI, tohtml, and Treesitter code. supported by AI
2026-03-12docs: use "ev" convention in event-handlersJustin M. Keyes1
Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
2026-03-12feat(startup): warn if NVIM_LOG_FILE is inaccessible #38070anondeveg1
Problem: If NVIM_LOG_FILE, or the default fallback, is inaccessible (e.g. directory is owned by root), users get confused. Solution: Show a warning when $NVIM_LOG_FILE or $XDG_STATE_HOME are inaccessible. Also fix a latent memory leak: `os_mkdir_recurse` returns a uv error code (int), but it was stored as `bool`, causing `os_strerror` to receive an invalid error code and leak memory. See: https://docs.libuv.org/en/v1.x/errors.html#c.uv_strerror Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-03-11docs: api, messages, lsp, trustJustin M. Keyes1
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features.
2026-03-08feat(treesitter): incremental selectionaltermo1
Co-authored-by: György Andorka <gyorgy.andorka@protonmail.com>
2026-03-02test: suppress DSR wait warning when running tests (#38126)zeertzjq1
Problem: The DSR wait warning causes any test that involves Nvim TUI to become flaky on Windows. Example: FAILED test/functional/terminal/cursor_spec.lua @ 367: :terminal cursor can be positioned arbitrarily test/functional/terminal\cursor_spec.lua:377: Row 1 did not match. Expected: |*^ | |*~ | |*~ | |*~ | |*~ | |* | |{5:-- TERMINAL --} | Actual: |* | |* | |*{2: }| |*{103:defaults.lua: Did not detect DSR response from ter}| |*{103:minal. This results in a slower startup time. }| |*{UNEXPECTED foreground = tonumber('0x000006'):Press ENTER or type command to continue^ }| |{5:-- TERMINAL --} | Solution: Don't show the DSR wait warning when running tests.
2026-02-27fix(startup): wait for bg detection before user config #37075Kyle1
Problem: Automatic background detection sets the background option too late, which loads colorschemes twice and causes problems when the user's terminal background doesn't match the default (#32109, #36211, #36416). Solution: Use a DA1 query to determine whether the TTY supports OSC 11. Wait for background detection and setting to complete before processing user config. Note: To preserve the existing behavior as much as possible, this triggers OptionSet manually on VimEnter (since it won't trigger automatically if we set bg during startup). However, I'm unsure if this behavior is truly desired given that the documentation says OptionSet is triggered "After setting an option (except during |startup|)." Also fixes flickering issue #28667. To check for flickering: nvim --clean --cmd "set termguicolors" --cmd "echo \"foo\"" --cmd "sleep 10" On master, this gives me a black screen for 10 seconds, but on this branch, the background is dark or light depending on the terminal background (since the option is now set during startup rather than after VimEnter).
2026-02-16feat(lsp): support `textDocument/documentLink` (#37644)Maria Solano1
2025-12-30build: ship "_core/*" as bytecode (built-into Nvim binary)Justin M. Keyes1
Problem: We want to encourage implementing core features in Lua instead of C, but it's clumsy because: - Core Lua code (built into `nvim` so it is available even if VIMRUNTIME is missing/invalid) requires manually updating CMakeLists.txt, or stuffing it into `_editor.lua`. - Core Lua modules are not organized similar to C modules, `_editor.lua` is getting too big. Solution: - Introduce `_core/` where core Lua code can live. All Lua modules added there will automatically be included as bytecode in the `nvim` binary. - Move these core modules into `_core/*`: ``` _defaults.lua _editor.lua _options.lua _system.lua shared.lua ``` TODO: - Move `_extui/ => _core/ui2/`