aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
* fix(progress): show progress-status only in curwin #38458Shadman2026-03-24
| | | | | | | | | | | | | | | | Problem: Currently same progress stat get's displayed on statusline of all windows. This is repeatitive and noisy. Solultion: Only display progress-status on the focused window Problem: Currently, when multiple progress are on going we show it as Progress: {N} items {percent}% format. It can be simplified sinnce items doesn't really add enough value for the valuable space it takes in statusline Solution: Change format to Progress: {percent}%({N})
* fix(vim.net): always pass response body to on_response #38460Yochem van Rosmalen2026-03-24
| | | | | | | | | | Problem: on_response(err, response) handler doesn't receive a response when an output buffer or path is supplied to vim.net.request. User might want to both output output to a file/buffer and also do something with it on response. Solution: If an on_response handler was given, then pass the response to it.
* Merge #38402 from justinmk/doc2Justin M. Keyes2026-03-24
|\
| * test(lsp): get_configs resolves only necessary configsJustin M. Keyes2026-03-24
| |
| * docs: api, plugins, ui2Justin M. Keyes2026-03-24
| |
* | vim-patch:9.2.0235: filetype: wks files are not recognized (#38451)Anakin Childerhose2026-03-23
|/ | | | | | | | | | | | | | | | | | | | | Problem: filetype: wks files are not recognized. Solution: Detect *.wks, *.wks.in and *.wks.inc as wks filetype, include a filetype and syntax plugin (Anakin Childerhose) The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files to define image partition and bootloader layouts. wks files can end with .wks, .wks.in for templated wks files, and .wks.inc for including in other .wks files. The autocmd for *.wks.inc needs to come before *.inc in runtime/ftdetect.vim Reference: https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks closes: vim/vim#19796 https://github.com/vim/vim/commit/8c116bbe79eab7337bb5c979468d3b0cb5933d07
* feat(net): vim.net.request(outbuf) writes response to buffer #36164Yochem van Rosmalen2026-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Non-trivial to write output of vim.net.request to buffer. Requires extra code in plugin/net.lua which can't be reused by other plugin authors. ``` vim.net.request('https://neovim.io', {}, function(err, res) if not err then local buf = vim.api.nvim_create_buf(true, false) if res then local lines = vim.split(res.body, '\n', { plain = true }) vim.api.nvim_buf_set_lines(buf, 0, -1, true, lines) end end end) ``` Solution: Accept an optional `outbuf` argument to indicate the buffer to write output to, similar to `outpath`. vim.net.request('https://neovim.io', { outbuf = buf }) Other fixes / followups: - Make plugin/net.lua smaller - Return objection with close() method - vim.net.request.Opts class - vim.validate single calls - Use (''):format(...) instead of `..`
* fix(lsp): get_namespace signature (#38449)Tristan Knight2026-03-23
| | | | | | Problem: Since the change to `pull_id` in #37938 we used the deprecated signature internally Solution: Don't
* refactor(treesitter)!: remove "all" option of Query:iter_matches #33070Gregory Anders2026-03-23
| | | | | This option was introduced to help with transitioning to the new behavior during the 0.11 release cycle with the intention of removing in 0.12.
* fix(lsp): completion word includes leading space from label #38435glepnir2026-03-23
| | | | | | | | | | Problem: clangd prepends a space/bullet indicator to label. With labelDetailsSupport enabled, the signature moves to labelDetails, making label shorter. This flips the length comparison in get_completion_word, causing it to use item.label directly and insert the indicator into the buffer. Solution: only prefer filterText over label when label starts with non-keyword character in get_completion_word fallback branch.
* refactor: rename termcap.lua -> tty.lua #38437Justin M. Keyes2026-03-23
| | | | | | | | | 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.
* fix(lua): drop support for boolean `buf` in `vim.keymap` #38432skewb1k2026-03-23
| | | | | | | | | | | Problem: `vim.keymap.*.Opts.buf` allows `boolean` aliases for more widely used `integer?` values, `true` -> `0` and `false` -> `nil`. This conversion is unnecessary and can be handled at call sites. Solution: As a follow-up to deprecating the `buffer` option, drop support for boolean values for the new `buf` option. The deprecated `buffer` continues to support booleans for backward compatibility.
* fix(lsp): snippet preview blocked completionItem/resolve request #38428glepnir2026-03-23
| | | | | | | | Problem: Generating snippet preview in get_doc() populated the documentation field before resolve, so the resolve request was never sent. Solution: Move snippet preview logic into on_completechanged and the resolve callback so it no longer blocks the resolve request.
* feat(lsp): attach to buftype=help buffers #38412Barrett Ruth2026-03-23
| | | | | | | | Problem: `vim.lsp.enable()` skips all buffers with non-empty `buftype`, including `help` buffers. LSPs targeting `filetype='help'` never auto-attach despite help buffers being real files. Solution: Expand the `buftype` guard in `lsp_enable_callback` to allow `help` alongside `""`.
* fix(runtime)!: move "tohtml" to pack/dist/opt/ #34557Justin M. Keyes2026-03-23
| | | | | | | | | | | Problem: The "tohtml" plugin is loaded by default. Solution: - Move it to `pack/dist/opt/nvim.tohtml/`, it is an "opt-in" plugin now. - Document guidelines. - Also revert the `plugin/` locations of `spellfile.lua` and `net.lua`. That idea was not worth the trouble, it will be too much re-education for too little gain.
* revert: "feat(lsp): add `buftypes` field to `vim.lsp.Config`" #38421Maria Solano2026-03-22
| | | | | revert: "feat(lsp): add `buftypes` field to `vim.lsp.Config` (#38380)" This reverts commit cfcdbcf638b5957213b3c1a55d5d1b5659a2fb3e.
* fix(provider): support python3.14 #38419Eisuke Kawashima2026-03-22
| | | Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* Merge #38410 from justinmk/fix-numbered-list-htmlJustin M. Keyes2026-03-21
|\
| * docs: starting.txt new layoutJustin M. Keyes2026-03-22
| |
* | feat(lsp): add `buftypes` field to `vim.lsp.Config` (#38380)Barrett Ruth2026-03-21
| | | | | | | | | | | | Problem: `vim.lsp.enable()` skips buffers with `buftype` set, even when `filetype` matches. Solution: Add `buftypes` field to `vim.lsp.Config`.
* | fix(lsp): restore virtual document color visibility (#38407)KrrishJain2026-03-22
| | | | | | | | | | | | | | | | | | | | Problem: Default swatch unicode character got lost. Solution: Put it back where it belongs. --------- Co-authored-by: vnadgaonkar-spec <vnadgaonkar@gmail.com> Co-authored-by: Christian Clason <ch.clason+github@icloud.com>
* | feat(lsp): support CompletionItem.labelDetails #38403glepnir2026-03-21
|/ | | | | | | | | Problem: CompletionItem.labelDetails is ignored, losing function signatures and module info in the completion menu. Solution: Append labelDetails.detail to abbr and use labelDetails.description for menu with fallback to item.detail. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemLabelDetails
* feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360skewb1k2026-03-21
| | | | | | 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`.
* feat(ui2): configure maximum window heights #38392luukvbaal2026-03-21
| | | | | | | | | | | | | | | | | | | Problem: - Window height is set dynamically to match the text height, making it difficult for the user to use a different height. - Cmdwin is closed to enter the pager but still taken into account for the pager position, and not restored when the pager is closed. - Dialog pager handler may unnecessarily consume <Esc>. Solution: - Add maximum height config fields for each of the UI2 windows, where a number smaller than one is a fraction of 'lines', absolute height otherwise (i.e. `cfg.msg.pager.height = 0.5`). - If the cmdwin will be closed to enter the pager, don't try to position the pager above it. Re-enter the cmdwin when the pager is closed. - Only add vim.on_key() handler for the dialog paging is actually possible.
* fix(lsp/diagnostic): use diagnostic provider identifier for code actions #38401Sergei Slipchenko2026-03-21
| | | | | | | | | | | | | | | Problem: f9b2189b287a14478546da72b7ecdfd3afe981c7 started using namespaces for pull diagnostics that look like this `<id>:<identifier>`. `vim.lsp.buf.codeaction` passes `true` instead of an identifier to `vim.lsp.diagnostic.get_namespace`, resulting in a namespace that looks like `<id>:nil`. The end result is that none of the diagnostics are passed to `textDocument/codeAction` request. Because of that server might not send any code actions back. For example, eslint lsp responds with an empty list of actions if it receives no diagnostics. Solution: use `_provider_foreach` to collect diagnostics from all `identifiers` and use that identifier to get a namespace instead of `true`.
* vim-patch:9.2.0217: filetype: cto files are not recognized (#38400)zeertzjq2026-03-21
| | | | | | | | | | | | | | | | | | Problem: filetype: cto files are not recognized Solution: Detect *.cto as concerto filetype (Jamie Shorten) Add filetype detection for the Concerto Modelling Language. Concerto is a schema language by the Accord Project for defining data models used in smart legal contracts and business networks. Reference: Language spec: https://concerto.accordproject.org Tree-sitter grammar: https://github.com/accordproject/concerto-tree-sitter closes: vim/vim#19760 https://github.com/vim/vim/commit/68f9dedba46b4e6625459d94342a2e2c7f5b17b7 Co-authored-by: Jamie Shorten <jamie@jamieshorten.com>
* docs: miscJustin M. Keyes2026-03-20
|
* fix(pack): account for Git's "insteadOf" in `:checkhealth` #38393Evgeni Chasnovski2026-03-20
| | | | | | | | | | | | Problem: It is possible (and documented in `:h vim.pack`) that plugin's `src` uses "insteadOf" Git config. In that case comparing it directly to repo's `origin` will error. Solution: Add extra check that lockfile's `src` is not equal to repo's `origin` when taking Git's "insteadOf" into account. However, still report the original lockfile's `src` in the `:checkhealth` output, as it seems to be a clearer indication of what actually is wrong.
* fix(lsp): handle completion/resolve response arriving after on_insert_leaveMathias Fussenegger2026-03-20
| | | | | | If a user accepts completion and immediately exits insert mode, it could happen that `Context.cursor` was nil by the time the `completion/resolve` response arrives, leading to an error.
* feat(progress): status api, 'statusline' integration #35428Shadman2026-03-20
| | | | | | | | | | | | | | Problem: Default statusline doesn't show progress status. Solution: - Provide `vim.ui.progress_status()`. - Include it in the default 'statusline'. How it works: Status text summarizes "running" progress messages. - If none: returns empty string - If one running item: "title: percent%" - If multiple running items: "Progress: N items avg-percent%"
* Merge #38047 _provider_foreachJustin M. Keyes2026-03-20
|\
| * fix(lsp): improve diagnostics handling and commentstris2032026-03-19
| | | | | | | | | | | | | | | | - Add TODO comments for aggregating diagnostics from all pull namespaces and for clearing diagnostics when an empty array is received, referencing the LSP specification. - Update diagnostics refresh logic to safely access previousResultId, preventing potential nil errors.
| * fix(lsp/diagnostic): key resultId by client and identifiertris2032026-03-19
| | | | | | | | | | | | | | | | Previously, resultId for diagnostics was keyed only by client_id, which could cause issues when multiple identifiers are used by the same client. This change introduces a composite key of client_id and identifier for client_result_id, ensuring correct tracking of diagnostic results per identifier. Updates all relevant logic to use the new keying scheme.
| * fix(lsp): handle providers without subcapabilitiestris2032026-03-19
| | | | | | | | | | | | | | | | | | Previously, the LSP client assumed all providers had subcapabilities, which could cause issues when a provider did not. This change adds a check for the presence of subcapabilities before attempting to access them, ensuring correct handling of both cases. This improves compatibility with servers that register providers without additional capabilities.
| * fix(lsp): request diagnostics from all registrationstris2032026-03-19
| | | | | | | | | | | | | | | | Update diagnostic refresh to request diagnostics from all provider registrations using _provider_foreach. This ensures diagnostics are fetched from every registered provider during a refresh. Co-authored-by: ZieMcd <ziemcd@gmail.com>
| * refactor(lsp): replace _provider_value_get with _provider_foreachtris2032026-03-19
| | | | | | | | | | | | | | | | Introduce _provider_foreach to iterate over all matching provider capabilities for a given LSP method, handling both static and dynamic registrations. Update diagnostic logic and tests to use the new iteration approach, simplifying capability access and improving consistency across features.
* | feat(stdlib): vim.fs.ext() returns file extension #36997Yochem van Rosmalen2026-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Checking the extension of a file is done often, e.g. in Nvim's codebase for differentiating Lua and Vimscript files in the runtime. The current way to do this in Lua is (1) a Lua pattern match, which has pitfalls such as not considering filenames starting with a dot, or (2) fnamemodify() which is both hard to discover and hard to use / read if not very familiar with the possible modifiers. vim.fs.ext() returns the file extension including the leading dot of the extension. Similar to the "file extension" implementation of many other stdlibs (including fnamemodify(file, ":e")), a leading dot doesn't indicate the start of the extension. E.g.: the .git folder in a repository doesn't have the extension .git, but it simply has no extension, similar to a folder named git or any other filename without dot(s).
* | fix(lsp): unify LSP error logging prefixes #38354Yi Ming2026-03-20
| | | | | | | | | | | | | | Problem The format of LSP log messages is inconsistent; some include underscores, while others are not logged at all. Solution Standardize log recording and unify the log message prefixes with the module names.
* | fix(lsp): guard dynamic capability attachment #38382Tristan Knight2026-03-20
| | | | | | | | | | | | | | | | | | Problem: The capability attach path for client/registerCapability can initialize a capability even when the capability was only registered in specific buffers Solution: Check supports_method() before attaching capabilities from the dynamic registration handler so unsupported registrations are ignored. AI-assisted: OpenCode
* | vim-patch:9.2.0204: filetype: cps files are not recognizedzeertzjq2026-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: cps files are not recognized Solution: Detect *.cps files as json filetype (Guillaume Barbier). Reference: https://github.com/cps-org/cps https://cps-org.github.io/cps/ closes: vim/vim#19758 https://github.com/vim/vim/commit/53884ba7a8fb22de006689a6feb88fb8f0bd7db9 Co-authored-by: Guillaume Barbier <barbier.guillaume60@gmail.com>
* | vim-patch:9.2.0201: filetype: Wireguard config files not recognizedzeertzjq2026-03-20
|/ | | | | | | | | | | | Problem: filetype: Wireguard config files not recognized Solution: Detect /etc/wireguard/*.conf files as dosini filetype (Furkan Sahin). closes: vim/vim#19751 https://github.com/vim/vim/commit/cc8798e71982de485cf00b2630d01285ca045008 Co-authored-by: Furkan Sahin <furkan-dev@proton.me>
* feat(defaults): map "grx" to vim.lsp.codelens.run() #37689Yi Ming2026-03-19
| | | | | | | | | | 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").
* fix(ui): apply 'pumborder' to mouse menu, fix overflow #36193glepnir2026-03-19
| | | | | | | | | | | Problem: Mouse popup menus (right-click context menus) do not respect the 'pumborder' option and could overflow screen boundaries when borders were enabled near the edge. Solution: - Remove the mouse menu exclusion from border rendering. - Add boundary check to shift menu left when border would exceed screen width, ensuring complete visibility of menu content and borders.
* fix(lsp): `vim.Range` check in `document_color.color_presentation()` (#38374)mpal90002026-03-19
| | | | | | | Problem: `vim.lsp.document_color.color_presentation()` throws, due to incorrect use of the `vim.Range` API. Solution: Change `vim.Range.has(a, b)` call to `a:has(b)`.
* fix(ui2): wrong condition used to detect active pagerLuuk van Baal2026-03-19
| | | | | | | | Problem: Entering the pager is scheduled to avoid errors while in the cmdwin. Meanwhile the current window is used as a condition to detect an active pager. Solution: Keep track of when the user is in the pager (or entered the cmdwin while the pager was open).
* fix(ui2): move windows to current tabpageLuuk van Baal2026-03-19
| | | | | | Problem: Windows are closed and re-opened after changing tabpage (and might be removed from the current tabpage after 094b297a). Solution: Ensure windows are on the current tabpage by moving them.
* feat(lsp): vim.lsp.get_configs() #37237Olivia Kinnear2026-03-19
| | | | | | | | | | Problem: No way to iterate configs. Users need to reach for `vim.lsp.config._configs`, an internal interface. Solution: Provide vim.lsp.get_configs(). Also indirectly improves :lsp enable/disable completion by discarding invalid configs from completion.
* feat(lsp): migrate `document_color` to capability framework (#38344)Maria Solano2026-03-18
| | | | | * feat(lsp): migrate `document_color` to capability framework * feat(lsp): use `vim.Range` in `document_color` module
* fix(options): vim.opt fails for 'fillchars' #37141Juan Pablo Briones2026-03-18
| | | | | | | | | | | Problem: When `to_vim_value[info.metatype](info, value)` is called, a list value such as `{'eob:a'}` is treated like a map, which generates `1:eob:a`. Note: commands like `:lua vim.opt.wildmode={'longest:full'}` are not an issue because only cases harcoded in `key_value_options` have metatype `map`. Solution: Check for array type and use the same logic as in array metatypes.
* docs: misc, terminalJustin M. Keyes2026-03-18
| | | | | | | | Close #38319 Close #38348 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Barrett Ruth <br.barrettruth@gmail.com>