summaryrefslogtreecommitdiffstatshomepage
path: root/runtime
AgeCommit message (Collapse)AuthorFiles
2026-04-24fix(lsp): handle self-mapped methods in supports_method #39383nightlyTristan Knight1
Problem: The LSP client incorrectly checks for server capabilities when determining support for self-mapped methods (e.g., 'shutdown'), which do not have corresponding capabilities in the server's response. This leads to false negatives when checking if such methods are supported. This was handled correctly for dynamic registrations, but not for static. Methods such as 'shutdown', do not have a related server capability and should be assumed to be supported. Solution: Update the `supports_method` logic to always return true for self-mapped methods.
2026-04-24feat(tui): restore 'ttyfast' to control tty requests #38699Kyle6
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 Cardenas5
Problem: No way to signal "unknown" or "indeterminate" progress percentage. Solution: Treat percent=nil as "indeterminate" percent.
2026-04-24fix(lsp): more info in error msg, deduplicate test #39359Justin M. Keyes1
2026-04-24fix(trust): always use "/" slashes in filepaths #39355Justin M. Keyes2
Problem: We should not use "\" (backslashes) except where absolutely required. See references in https://github.com/neovim/neovim/pull/37729 Solution: There is no reason to use "\" slashes in the trust db, so don't.
2026-04-24vim-patch:9.2.0390: filetype: some Beancount files are not recognized (#39360)zeertzjq1
Problem: filetype: some Beancount files are not recognized Solution: Detect *.bean files as beancount filetype (Bruno Belanyi) closes: vim/vim#20037 https://github.com/vim/vim/commit/521eac1877355d408c8c57bc31947cc86f31f41d Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
2026-04-23feat(excmd): add :uptime command #39331Olivia Kinnear6
Problem Nvim marks its v:starttime, but there is no user-friendly way to get Nvim's uptime. Solution Add :uptime (based loosely on uptime(1)).
2026-04-23fix(lsp): handle null id in JSON-RPC responses #38340atusy1
Problem: LSP spec allows response message to have a null request-id. This may happen when for example client sends unparseable request. https://github.com/microsoft/language-server-protocol/issues/196 Solution: Guard the server response branches against id=vim.NIL (json null), and handle error responses with null id by logging a warning and dispatching on error. Problem: CI (ubuntu asan, ubuntu tsan, windows) reports `uv_loop_close() hang?` from the two new null-id response tests. The leaked handle is the server-side accepted TCP socket created inside `server:listen` callback. The tests closed only the listener but not the accepted socket, so libuv could not finish shutting down the loop and each test session took ~2s extra to exit. Solution: Hoist the accepted socket to the outer `exec_lua` scope and close it at teardown before closing the listener. The close runs synchronously inside `exec_lua`, so the loop has time to dispose the handle before the session exits. * test(lsp): close accepted socket on read-loop exit/error Match the precedent in the handler test ("handler can return false as response") and the shared `_create_tcp_server` helper in `test/functional/plugin/lsp/testutil.lua`: close the accepted socket from inside the `create_read_loop` exit/error callbacks. The teardown close added in the previous commit remains as belt-and-suspenders, so the socket is disposed whether the server goes away first or the client does.
2026-04-23fix(trust): hash unchanged empty buffers as empty files #39027Barrett Ruth1
Problem: `vim.secure.trust()` hashes an unchanged empty buffer as a newline, so trusting an empty file by buffer never works. Solution: Hash unchanged empty-buffers `''` so buffer-based trust matches the on-disk empty file.
2026-04-23fix(lsp): malformed edit if apply_text_edits() is called twice #34954geril072
Problem: Use vim.lsp.util.apply_text_edits to re-apply the same textedit causes an incorrect edit, because apply_text_edits silently modifies the parameter. Solution: - Avoid changing `text_edit._index`. - Document this fun feature. Helped-by: Riley Bruins <ribru17@hotmail.com> Helped-by: Yi Ming <ofseed@foxmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-04-23fix(pack): only use tags that strictly comply with semver spec #39342Evgeni Chasnovski2
Problem: Using `version=vim.version.range(...)` in plugin specification is meant to use semver-like tags. Whether a tag is semver-like was decided by a plain `vim.version.parse` which is not strict by default. This allowed treating tags like `nvim-0.6` (which is usually reserved for the latest revision compatible with Nvim<=0.6 version) like semver tags and resulted in confusing behavior (preferring `nvim-0.6` tag over `v0.2.2`, for example). Solution: Use `vim.version.range(x, { strict = true })` to decide if the tag name is semver-like or not. This allows tags like both `v1.2.3` and `1.2.3` while being consistent in what Nvim thinks is a semver string. This is technically not a breaking change since it was documented that only tags like `v<major>.<minor>.<patch>` will be recognized as semver.
2026-04-23fix(lsp): callHierarchy/outgoingCalls ranges are relative to caller, not ↵Ashley Hauck1
callee #39336 Problem: The fromRanges field of the result of callHierarchy/outgoingCalls is documented as being relative to the caller. Using vim.lsp.buf.outgoing_calls() opened the qflist with an entry with the callee's filename, but the caller's line number. Solution: Open the qflist with the callers file (the bufnr from the request), rather than the callees (the uri from the resulting CallHierarchyItem)
2026-04-23fix(lsp): filter code_action diagnostics to the cursor #38988Barrett Ruth1
Problem: Cursor-position `vim.lsp.buf.code_action()` requests include all diagnostics on the current line, so unrelated same-line diagnostics affect the returned actions. Solution: Filter same-line diagnostics to the cursor position for cursor-position requests.
2026-04-23vim-patch:9.2.0383: [security]: runtime(netrw): shell-injection via sftp: ↵zeertzjq2
and file: URLs Problem: runtime(netrw): shell-injection via sftp: and file: URLs (Joshua Rogers) Solution: Escape temporary file names, harden filename suffix regex, drop unused g:netrw_tmpfile_escape variable Supported by AI https://github.com/vim/vim/commit/405e2fb6d54d5653523809e2853d99d1c000a5fc Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-23vim-patch:9.2.0367: runtime(netrw): ~ note expanded on MS Windowszeertzjq1
Problem: runtime(netrw): ~ note expanded on MS Windows (Tom Vamvanij) Solution: Expand ~ on MS Windows (Yasuhiro Matsumoto) On Windows, ":Explore ~" did nothing because the tilde expansion was gated to Unix/Cygwin only. Additionally, substitute() interprets backslashes in the replacement string specially (e.g. \U as a case modifier), which would corrupt $HOME values like C:\Users\name even if the branch were taken. Include has("win32") in the guard, anchor the pattern to the start of the string, and escape backslashes, ampersands and tildes in $HOME before substituting. fixes: vim/vim#20003 closes: vim/vim#20014 https://github.com/vim/vim/commit/723c0acf2535c87a5b7be0284e7379e071a1d610 Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-04-23vim-patch:21c0cd2: runtime(netrw): add missing escape() callszeertzjq1
https://github.com/vim/vim/commit/21c0cd29f808e32a7c159889c6dcf7a6fbf189f7 Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-04-23vim-patch:9.2.0302: runtime(netrw): RFC2396 decoding double escaping spaceszeertzjq1
Problem: runtime(netrw): RFC2396 decoding double escaping spaces (lilydjwg, after 3e60f03d942d6bb0f7eac) Solution: Remove escape() call, since we are using fnameescape() anyhow fixes: vim/vim#19913 https://github.com/vim/vim/commit/ab4ebb62ee2cbe5e25fb1746ac5dbe63a9d50260 Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-23vim-patch:3e60f03: runtime(netrw): use fnameescape() with FileUrlEdit()zeertzjq1
https://github.com/vim/vim/commit/3e60f03d942d6bb0f7eac61b149e83615518cec0 Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-23vim-patch:9.2.0089: netrw: does not take port into account in hostname ↵zeertzjq1
validation Problem: netrw: does not take port into account in hostname validation (after v9.2.0073) Solution: Update hostname validation check and test for an optional port number (Miguel Barro) closes: vim/vim#19533 https://github.com/vim/vim/commit/a6198523fb28a50d96945458792cdb4787d3cdda Co-authored-by: Miguel Barro <miguel.barro@live.com>
2026-04-23vim-patch:9.2.0073: [security]: possible command injection using netrwzeertzjq2
Problem: [security]: Insufficient validation of hostname and port in netrw URIs allows command injection via shell metacharacters (ehdgks0627, un3xploitable). Solution: Implement stricter RFC1123 hostname and IP validation. Use shellescape() for the provided hostname and port. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-m3xh-9434-g336 https://github.com/vim/vim/commit/79348dbbc09332130f4c86045e1541d68514fcc1 Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-23vim-patch:9.2.0037: netrw: need better tests for absolute pathszeertzjq1
Problem: netrw: need better tests for absolute paths Solution: Use absolutepath(), instead of regex test (Miguel Barro). closes: vim/vim#19477 https://github.com/vim/vim/commit/bd1dc5b1a652e9f2ba45e3695ea2d83e81992c88 Cherry-pick a typo fix from latest Vim. Co-authored-by: Miguel Barro <miguel.barro@live.com>
2026-04-23vim-patch:a2d87ba: runtime(netrw): Use right file system commands ↵zeertzjq2
initialization for Windows closes: vim/vim#19287 fixes: vim/vim#12290 https://github.com/vim/vim/commit/a2d87ba615f15956116f43f7c70f1b315d679cb4 Co-authored-by: Miguel Barro <miguel.barro@live.com>
2026-04-22ci: drop cirrus #39321Justin M. Keyes1
Problem: cirrus will shutdown soon, and we are running out of minutes anyway, which causes ci failures. Solution: Drop cirrus config.
2026-04-22feat(treesitter): expand selection to sibling node #38938altermo4
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-22feat(:restart): v:starttime, v:exitreason #39282Justin M. Keyes6
Problem: - The `ZR` feature makes it more obvious that we need some sort of flag so that an `ExitPre` / `QuitPre` / `VimLeave` handler can handle restarts differently than a normal exit. For example, it's common that users want `:mksession` on restart, but perhaps not on a normal exit. - Nvim has no way to report its "uptime". Solution: - Introduce `v:starttime` - Introduce `v:exitreason`
2026-04-22perf(lsp): clear table by table.clear() #39222Yi Ming4
benchmark: https://gist.github.com/ofseed/6224529d77c016c36f7ab2f977059848 local rounds = tonumber(arg[1]) or 1000 local count = tonumber(arg[2]) or 1000 -- Load the table.clear function. local clear = require("table.clear") local function fill(t, n) for i = 1, n do t[i] = i end end local function bench_reassign(n_rounds, n_items) local t = {} local start = os.clock() for _ = 1, n_rounds do t = {} collectgarbage("collect") fill(t, n_items) end return os.clock() - start end local function bench_reassign_no_gc(n_rounds, n_items) local t = {} local start = os.clock() for _ = 1, n_rounds do t = {} fill(t, n_items) end return os.clock() - start end local function bench_clear(n_rounds, n_items) local t = {} local start = os.clock() for _ = 1, n_rounds do clear(t) fill(t, n_items) end return os.clock() - start end -- Warm up LuaJIT before the real benchmark. do local t = {} for _ = 1, 2000 do clear(t) fill(t, count) end end collectgarbage("collect") local reassign_time = bench_reassign(rounds, count) collectgarbage("collect") local reassign_no_gc_time = bench_reassign_no_gc(rounds, count) collectgarbage("collect") local clear_time = bench_clear(rounds, count) print(string.format("rounds=%d count=%d", rounds, count)) print(string.format("t = {} + GC : %.6f s", reassign_time)) print(string.format("t = {} : %.6f s", reassign_no_gc_time)) print(string.format("table.clear : %.6f s", clear_time)) print(string.format("vs + GC : %.2fx", reassign_time / clear_time)) print(string.format("vs no GC : %.2fx", reassign_no_gc_time / clear_time)) benchmark result: rounds=1000 count=1000 t = {} + GC : 0.022469 s t = {} : 0.002570 s table.clear : 0.000387 s vs + GC : 58.06x vs no GC : 6.64x `count` is how many items the table has, and `round` is how many rounds we fill the table, clear, and then refill it. `table = {}` is clear the table by resigning a new empty one, because this script does not run persistently like nvim so GC is not triggered, so I added another extreme control group that manually triggers GC.
2026-04-22docs(quickfix): quickfix window location #39300luukvbaal1
Problem: Documentation for quickfix window location is outdated (since 6256adde). Solution: Update quickfix.txt.
2026-04-22fix(options): default 'titlestring' shows CWD #39233Nick Krichevsky2
Problem: In the default 'titlestring', if the containing directory is the CWD, it renders as "." Solution: Add `:p` to the titlestring.
2026-04-22fix(pack): GIT_DIR/GIT_WORK_TREE env vars may interfere #39279fleesk1
Problem: With GIT_DIR/GIT_WORK_TREE set, the LSP on the vim.pack.update() confirmation buffer does not show the correct git log on hover. Solution: Temporarily remove the git vars from the environment.
2026-04-22vim-patch:3918f32: runtime(doc): fix incorrect description of 'scrolloffpad'zeertzjq3
closes: vim/vim#20029 https://github.com/vim/vim/commit/3918f3232f874b3c96f8bfccc5049711f16c252e
2026-04-22vim-patch:9.2.0356: Cannot apply 'scrolloff' context lines at end of filezeertzjq5
Problem: Cannot apply 'scrolloff' context lines at end of file Solution: Add the 'scrolloffpad' option to keep 'scrolloff' context even when at the end of the file (McAuley Penney). closes: vim/vim#19040 https://github.com/vim/vim/commit/a414630393f81c9a5b8fa4d0fcc1287155f67751 Co-authored-by: McAuley Penney <jacobmpenney@gmail.com>
2026-04-22vim-patch:10040bc: runtime(sh): allow "#" in special derefszeertzjq1
Code like ${!#} flags the "#" as shDerefWordError [1]; the "!prefix" syntax region delegates to one of the shDerefSpecial handlers via @shDerefList, but it misses the "#" case as valid for ${##} and ${!#}. [1]: https://vi.stackexchange.com/q/48617/10604 Correct that. Indirection is only valid in Bash in Ksh, so rearrange the "!" handling to be conditional. closes: vim/vim#20016 Helped-by: Christian Brabandt <cb@256bit.org> https://github.com/vim/vim/commit/10040bc9cde340c52b5093cacb1d60fd2e621883 Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2026-04-22vim-patch:16d2854: runtime(graphql): Update syntax script to September 2025 speczeertzjq1
A new graphqlEscape syntax graph has been introduced to represent escape sequences within strings, including the braced unicode form (\u{H+}) added in the September 2025 specification. See: https://spec.graphql.org/September2025/ closes: vim/vim#20030 https://github.com/vim/vim/commit/16d28548d2d3c49733750b6ab7a50bc05ab65e0c Co-authored-by: Jon Parise <jon@indelible.org>
2026-04-22fix(incsearch): support `c_CTRL-{G,T}` with an offset (#39097)Barrett Ruth1
vim-patch:9.2.0374: c_CTRL-{G,T} does not handle offset Problem: c_CTRL-{G,T} does not handle offset, when cycling between matches Solution: Refactor parsing logic into parse_search_pattern_offset() and handle offsets, note: highlighting does not handle offsets yet (Barrett Ruth). fixes: vim/vim#19991 closes: vim/vim#19998 https://github.com/vim/vim/commit/c62342e5cfc339a87c1eb40ef34b2b31070d72a6
2026-04-22fix(:restart): avoid ERR/WRN logging on Windows with --listen (#39287)zeertzjq1
Problem: :restart leads to ERR/WRN logging on Windows with --listen. Solution: Add a log_level flag to vim._with() and use it to suppress logging from serverstart()/serverstop() during restart.
2026-04-21fix(messages): "progress" kind for busy messages #39280luukvbaal2
Problem: The "Scanning:" completion, bufwrite, and indent (there may be more) messages which indicate progress can use the "progress" kind for their msg_show event. Indent message does not have a kind. Solution: Emit these messages with the "progress" kind. Set the message id to the replaced kind so that a UI knows to replace it (and to provide a migration path in case a UI was distinguishing these messages for whatever reason).
2026-04-21Merge pull request #39076 from bfredl/zig0.16bfredl1
IT IS HAPPENING: Zig 0.16
2026-04-21fix(:restart): reuse --listen addr on Windows #38539Sanzhar Kuandyk1
Problem: On Windows, :restart cannot immediately reuse the canonical --listen address because named pipe release is asynchronous. Solution: Start the new Nvim server on a temporary address; in the new Nvim, retry serverstart() with the original ("canonical") address until it succeeds.
2026-04-21feat(normal): normal-mode ZR does :restartJustin M. Keyes5
Make it a normal-mode command instead of a default mapping.
2026-04-21feat(defaults): map ZR to restartMike J. McGuirk5
Problem: No default mapping for :restart. Solution: Map to ZR in defaults. Closes: https://github.com/neovim/neovim/issues/38942
2026-04-21fix(build): more changes to make zig 0.16.0 workbfredl1
2026-04-21vim-patch:9.2.0371: filetype: ghostty config files are not recognized (#39267)zeertzjq2
Problem: filetype: ghostty config files are not recognized Solution: Detect ghostty configuration files as ghostty filetype, include a simple ghostty filetype plugin (Bez Hermoso) closes: vim/vim#20002 https://github.com/vim/vim/commit/b30803b231beea13e2efa42fefc04be71a4e9bb5 Co-authored-by: Bez Hermoso <bezalelhermoso@gmail.com> Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-21vim-patch:1c88aee: runtime: Remove wrong syn oneline keyword from a few ↵zeertzjq5
syntax files (#39266) Also: - drop a few trailing whitespaces - mark the oneline keyword for :syn keyword as error in the Vim syntax script, add tests for it. closes: vim/vim#20018 https://github.com/vim/vim/commit/1c88aee1fa720aea07e133f32645914dcddd3435 Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2026-04-20fix(ui2): don't dismiss expanded messages for non-typed key #39247luukvbaal2
Problem: Invalid check for non-typed key to dismiss expanded cmdline. Unable to delay the timer that removes a message from the msg window. Solution: Check for empty string instead of nil to determine whether a key is typed. Restart the timer if it expires while the user is in the msg window. Allow entering the msg window with a mouse click.
2026-04-20fix(ui2): ensure msg window is visible after closing tabLuuk van Baal1
Problem: After closing a tabpage while the msg window is showing a message, it is hidden while the msg window still contains a message. Solution: Unhide the msg window after entering a tabpage and it still contains a message. Co-authored-by: Linykq <yukunlin590@gmail.com>
2026-04-20docs: misc #39207Justin M. Keyes5
2026-04-20fix(api): expose fg_indexed/bg_indexed in nvim_get_hl #39210glepnir3
Problem: fg_indexed/bg_indexed were dropped from nvim_get_hl output due to a wrong short_keys guard. HL_FG_INDEXED also wasn't cleared in hl_blend_attrs, and HLATTRS_DICT_SIZE was too small. Solution: Remove the short_keys guard, clear HL_FG_INDEXED in hl_blend_attrs, bump HLATTRS_DICT_SIZE to 24, and clarify docs that these flags mean rgb is an approximation of the cterm palette index.
2026-04-20Merge #39194 from justinmk/luavimfnJustin M. Keyes3
2026-04-19feat(options): add 'winpinned' to pin a window #39157luukvbaal5
Problem: - Unable to "pin" a window to prevent closing without specifically being targeted. - :fclose closes hidden windows (even before visible windows). Solution: - Add 'winpinned' window-local option. When set, window is skipped by :fclose and :only. Pin the ui2 cmdline window (which should always be visible), so that it is not closed by :only/fclose. - Skip over hidden (and pinned) windows with :fclose. Co-authored-by: glepnir <glephunter@gmail.com>
2026-04-20fix(health): workaround nil vim.system():wait() resultJustin M. Keyes1
Workaround until https://github.com/neovim/neovim/issues/37922 is fixed.