aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* fix(pack): open confirmation buffer in tabpage after the current oneEvgeni Chasnovski2025-08-02
|
* fix(pack): ensure consistent order of changelog during updateEvgeni Chasnovski2025-08-02
| | | | | | | Problem: Left (`<` prefix) and right (`>` prefix) parts of update changelog come in not fixed order: it can be left-right or right-left. Solution: Ensure left-right order.
* fix(pack): make newer version suggestions more robustEvgeni Chasnovski2025-08-02
| | | | | | | | | | | | | Problem: New version suggestions in update confirmation buffer might include semver tags that were committed later but for versions that are not greater than current. Like if versions committed in order `v0.2.0` - `v0.3.0` - `v0.2.1` - `v0.3.1`, then when on `v0.3.0` both `v0.2.1` and `v0.3.1` are suggested, but only the latter is newer as a version. This is because those tags are computed with post-processed `git tag --list --contains HEAD`. Solution: Compute all semver tags and filter only those greater than the latest version available at HEAD.
* refactor(pack): use `vim.cmd` methods with structured inputEvgeni Chasnovski2025-08-02
|
* fix(pack): ensure explicit default `version` in events (where possible)Evgeni Chasnovski2025-08-02
| | | | | | | | | | | | | | | | | | | | | | Problem: Both `PackChangedPre` and `PackChanged` contain |event-data| with plugin's `spec`. It looks like a good idea to have all its triggers contain the same format across all kinds ("install", "update", "delete"). There are several choices: - Have it be as verbatim as supplied to `vim.pack.add()`, i.e. can be either string or table. A bit too ambiguous. - Have it be table with `src` and `name` inferred. This requires less work for "install", but more work for "update" and "delete" (since they use `vim.pack.get()` which already infers default `version`). - Have it be table with *all* defaults made explicit. This looks like the best approach, but requires extra care to only infer default `version` when needed (i.e. avoid inferring during regular load) because it is costly in terms of startup time. This might also introduce inconsistency when dealing with lockfile(s) as information there should be as close to what user supplied as possible. Address that when dealing with lockfile. Solution: Ensure explicit `version` in all events where possible.
* fix(pack): use `vim.pack:` as message/progress prefixEvgeni Chasnovski2025-08-02
|
* fix(pack): validate installed plugins in `update()` and `del()`Evgeni Chasnovski2025-08-02
| | | | | | | | | Problem: Currently `update()` and `del()` silently ignore input plugin names that are not for already installed plugin. This might lead to confusion because they are not explicitly reported. Solution: Check that all input names are for installed plugins and error otherwise.
* feat(pack): use colored `nvim_echo` chunks to show progress reportEvgeni Chasnovski2025-08-02
| | | | | | | | Problem: using `print()` to show progress report writes to `stdout` when in `--headless` mode (interferes with the testing output) and doesn't allow coloring. Solution: use `nvim_echo` with colored chunks.
* fix(pack): ignore 'loadplugins' when sourcing 'after/plugin' scriptsEvgeni Chasnovski2025-08-02
| | | | | | | | | Problem: Sourcing of 'after/plugin' scripts depends on the value of 'loadplugins' option. It is redundant, as it has effect only during startup, while it is combined with `vim.v.vim_did_enter == 1` (i.e. "it is after starting up") condition. Solution: Ignore it.
* fix(pack): improve `vim.pack.add()` input validationEvgeni Chasnovski2025-08-02
|
* fix(pack): use 'coxpcall.lua' on non-LuaJITEvgeni Chasnovski2025-08-02
| | | | | | | | Problem: `attempt to yield across metamethod/C-call boundary` error when trying to use `vim.pack.add()`. Solution: use `pcall()` variant from 'coxpcall' on non-LuaJIT version of Lua.
* fix(statusline): don't require'vim.diagnostic' unless already usedbfredl2025-08-02
| | | | | | | | | This workarounds a bug likely in nvim__get_runtime, and fixes #35124 Though I'd argue it is more correct anyway as the point of vim.SUBMODULE lazy loading is "only pay for what you use". If no one has require'vim.diagnostic' yet in LSP or otherwise, there cannot be any diagostics available and loading the lua module is wasteful.
* fix(diagnostic): check if the buffer is loaded #35125Eisuke Kawashima2025-07-31
| | | | | fix #35116 Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* fix(statusline): check buf valid before redraw #35123Anton Kastritskii2025-07-31
| | | fixes #35116
* feat(statusline): vim.diagnostic.status() #33723Anton Kastritskii2025-07-29
| | | | | | | | Problem: Not easy to get a status string for diagnostics. Solution: - Add vim.diagnostic.status(). - Add it to the default 'statusline'.
* fix(extui): ensure windows are valid in scheduled on_key (#35106)luukvbaal2025-07-29
|
* fix(messages): 'exrc' / secure messagesJustin M. Keyes2025-07-28
|
* docs: lsp, ui events, dev guidance, osc7Justin M. Keyes2025-07-28
| | | | fix #34981
* feat(exrc): user must view and explicitly run ":trust" #35069nyngwang2025-07-28
| | | | | | | | | Problem: It's relatively easy to mispress key `a` to (a)llow arbitrary execution of 'exrc' files. #35050 Solution: - For exrc files (not directories), remove "allow" menu item. Require the user to "view" and then explicitly `:trust` the file.
* feat(lua): add vim.list.unique()Lewis Russell2025-07-28
| | | | | | | | Problem: No way to deduplicate values in a list in-place Solution: Add `vim.list.unique()`
* fix(diagnostics): avoid jumping to diagnostics in deleted ranges #35088Sergei Slipchenko2025-07-28
| | | | | | | | | | | | Problem: diagnostic extmark used for positioning continues to exist after deleting a range containing it, so it's possible to jump to a next/previous diagnositc, which isn't visible in any way, including not being shown via `open_float`. Solution: enable `invalidate` flag when setting an extmark to be able to filter out diagnostics based on `invalid` flag when looking for next/previous diagnostic to jump to.
* feat: serverlist({peer=true}) returns peer addresses #34806Siddhant Agarwal2025-07-27
| | | | | | | Problem: serverlist() only lists servers that were started by the current Nvim. Solution: Look for other Nvim servers in stdpath("run").
* feat(lsp): enable document_color by default #35086Maria José Solano2025-07-27
|
* fix(snippet): jumping backwards to choice node (#35062)TheBlob422025-07-27
| | | | Avoid duplicate text when jumping back to a choice node. Set cursor to end of tabstop range and prioritize current choice in completion items.
* fix(snippet): setting end_right_gravity (#35061)TheBlob422025-07-27
| | | | | | When right_gravity is set to true for deactivating tabstop expansion we have to set end_right_gravity to false to avoid expanding the tabstop region on the right side. Vice versa for activating tabstop expansion again.
* fix(lsp): don't override `config.title` in `vim.lsp.buf.signature_help()` #35075Maria José Solano2025-07-26
|
* fix(lsp): codelens extmark line out of range (#35070)Jaehwang Jung2025-07-26
| | | | | | | | | Problem: When setting extmark for a codelens after it's asynchronously resolved, the line may have been removed, raising "invalid 'line': out of range" error. This is a regression from #34888. Solution: Re-introduce the line count check.
* fix(diagnostics): position diagnostics using extmarks #34014Sergei Slipchenko2025-07-25
| | | | | | | | | | | | | Problem: Diagnostic positions are not being updated after text changes, which means `vim.diagnostic.open_float` and `vim.diagnostic.jump` will work with outdated positions when text is changed until diagnostics are updated again (if ever). Solution: Create extmarks in `vim.diagnostic.set` and use their positions for `vim.diagnostic.open_float` and `next_diagnostic` (used by `vim.diagnostic.jump`, `vim.diagnostic.get_next` and `vim.diagnostic.get_prev`).
* fix(diagnostics): extend conversion support from/to quickfix format (#34006)Mike2025-07-25
| | | | | Use uppercase to check severity Mark quickfix items as valid when converting from diagnostics Support nr/code attribute between formats
* fix(extui): attempt to perform arithmetic on field 'last_emsg' (#35047)phanium2025-07-24
| | | Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* refactor(lua): use vim.system #34707Yochem van Rosmalen2025-07-23
|
* fix(iter): ArrayIter:last returns nil when filtered to empty #34697glepnir2025-07-22
| | | | | | Problem: After filtering out all elements, ArrayIter:last still returns a stale element. Solution: Add check for self._head == self._tail and return nil early. Fix #34696
* vim-patch:5711d76: runtime(doc): Tweak documentation stylezeertzjq2025-07-23
| | | | | | | | closes: vim/vim#17824 https://github.com/vim/vim/commit/5711d768181c3b08869ac41ee947a56a26763450 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1576: cannot easily trigger wildcard expansion (#35022)zeertzjq2025-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot easily trigger wildcard expansion Solution: Introduce wildtrigger() function (Girish Palya) This PR introduces a new `wildtrigger()` function. See `:h wildtrigger()` `wildtrigger()` behaves like pressing the `wildchar,` but provides a more refined and controlled completion experience: - Suppresses beeps when no matches are found. - Avoids displaying irrelevant completions (like full command lists) when the prefix is insufficient or doesn't match. - Skips completion if the typeahead buffer has pending input or if a wildmenu is already active. - Does not print "..." before completion. This is an improvement on the `feedkeys()` based autocompletion script given in vim/vim#16759. closes: vim/vim#17806 https://github.com/vim/vim/commit/b486ed8266d3b8cd1ffab7d7f302fbd6d5a55c70 While at it, also make Ctrl-Z trigger search completion. Co-authored-by: Girish Palya <girishji@gmail.com>
* fix(lsp): support `containerName` in symbol requests #35029Riley Bruins2025-07-22
| | | The field is present for SymbolInformation and WorkspaceSymbol.
* feat(ui2): more predictable routing #35028luukvbaal2025-07-22
| | | | | | Problem: Routing based on message kinds can be perceived as unpredictable. Solution: Implement phase 1 of #34281, always showing the full message in a window dismissed on any user input when it does not fit in the 'cmdheight'. Also show spill "[+n]" indicator if needed.
* feat(lsp): diagnostic related documents supportRiley Bruins2025-07-21
|
* fix(lsp): store result id for unchanged diagnostic reportsRiley Bruins2025-07-21
| | | | | | | | | **Problem:** For unchanged document diagnostic reports, the `resultId` is ignored completely, even though it should still be saved for the request (in fact, the spec marks it as mandatory for unchanged reports, so it should be extra important). **Solution:** Always store the `resultId`.
* Merge pull request #34894 from janlazo/vim-8.1.0857zeertzjq2025-07-21
|\ | | | | vim-patch:8.1.{770,857,914,977,1004,1526,1551,1565,1584,1629,1641,1703,1728,1730,1736,1802,1853,1891,2127,2200},8.2.3922,9.0.{546,928},9.1.1382
| * vim-patch:8.1.1526: no numerical value for the patchlevelJan Edmund Lazo2025-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No numerical value for the patchlevel. Solution: Add v:versionlong. https://github.com/vim/vim/commit/37df9a4401f6737d6216306ea77a7e080c942aea Restore "highest_patch()" solely for "v:versionlong". Copy/paste Test_vvar_scriptversion2() from patch 9.1.1540. It works without ":scriptversion 2". In general, if Vim's test works with ":scriptversion 1", just port it for additional coverage. --- vim-patch:8.1.1565: MS-Windows: no sound support Problem: MS-Windows: no sound support. Solution: Add sound support for MS-Windows. (Yasuhiro Matsumoto, Ken Takata, closes vim/vim#4522) https://github.com/vim/vim/commit/9b283523f2f75b45feef902b8713808e883d9c19 ---- "sound" feature is N/A now but this updates "v:versionlong" docs. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:1f6faff: runtime(doc): mention the "pipefail" shell option (#35016)zeertzjq2025-07-21
|/ | | | | | | related: vim/vim#17787 https://github.com/vim/vim/commit/1f6faff9126dde38029bd5a1eed279c294b72dca Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(lsp): show notification with empty hover response (#35014)Maria José Solano2025-07-20
|
* refactor(lsp): inline `on_client_exit`Yi Ming2025-07-20
|
* refactor(lsp): track clients in `all_clients` once initializedYi Ming2025-07-20
|
* refactor(lsp): extract `Client._on_detach` to reduce duplicated codeYi Ming2025-07-20
|
* fix(treesitter): ":EditQuery [lang]" with injected languages #34914Peter Cardenas2025-07-19
| | | | | | | | | | Problem: `:EditQuery` command accepts a language argument, but it doesn't highlight properly for injected languages. Solution: - Fully parse with the root language and then filter the query on the child trees that are of the language requested. - Also support completion (`EditQuery <tab>`).
* feat(lsp): support linked editing ranges #34388Riley Bruins2025-07-19
| | | ref: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_linkedEditingRange
* fix(pack): close confirmation buffer's tabpage by ID #34971György Andorka2025-07-18
| | | | | | | | | Problem: On canceling the update (triggering `WinClosed`), the tab page will most probably be closed too. Closing some other tab page while the confirmation buffer is open also changes tab page numbers. We are trying to close the wrong tab page in both cases. Solution: save the tab page ID, and attempt to get the tab page number from the ID when closing the buffer.
* vim-patch:9.1.1544: :retab cannot be limited to indentation only (#34939)zeertzjq2025-07-18
| | | | | | | | | | | Problem: :retab cannot be limited to indentation only Solution: add the optional -indentonly parameter (Hirohito Higashi) closes: vim/vim#17730 https://github.com/vim/vim/commit/836e54f5de8479a39f6d1dd4a13202af0e447311 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1557: not possible to anchor specific lines in diff mode (#34967)zeertzjq2025-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: not possible to anchor specific lines in diff mode Solution: Add support for the anchoring lines in diff mode using the 'diffanchor' option (Yee Cheng Chin). Adds support for anchoring specific lines to each other while viewing a diff. While lines are anchored, they are guaranteed to be aligned to each other in a diff view, allowing the user to control and inform the diff algorithm what the desired alignment is. Internally, this is done by splitting up the buffer at each anchor and run the diff algorithm on each split section separately, and then merge the results back for a logically consistent diff result. To do this, add a new "diffanchors" option that takes a list of `{address}`, and a new "diffopt" option value "anchor". Each address specified will be an anchor, and the user can choose to use any type of address, including marks, line numbers, or pattern search. Anchors are sorted by line number in each file, and it's possible to have multiple anchors on the same line (this is useful when doing multi-buffer diff). Update documentation to provide examples. This is similar to Git diff's `--anchored` flag. Other diff tools like Meld/Araxis Merge also have similar features (called "synchronization points" or "synchronization links"). We are not using Git/Xdiff's `--anchored` implementation here because it has a very limited API (it requires usage of the Patience algorithm, and can only anchor unique lines that are the same across both files). Because the user could anchor anywhere, diff anchors could result in adjacent diff blocks (one block is directly touching another without a gap), if there is a change right above the anchor point. We don't want to merge these diff blocks because we want to line up the change at the anchor. Adjacent diff blocks were first allowed when linematch was added, but the existing code had a lot of branched paths where line-matched diff blocks were handled differently. As a part of this change, refactor them to have a more unified code path that is generalized enough to handle adjacent diff blocks correctly and without needing to carve in exceptions all over the place. closes: vim/vim#17615 https://github.com/vim/vim/commit/0d9160e11ce4b921adff1e5621dd989ce96fb0f3 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>