aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * 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.
* fix(tutor): use invalidate field in nvim_buf_set_extmark() #34989Phạm Bình An2025-07-18
| | | | | | | | | | | Problem: If users delete a line containing extmark, it will move to the next line, which could highlight the next line in an unwanted way. Solution: - Use `invalidate` field in `nvim_buf_set_extmark()` to prevent the extmark from moving. - Also save from "priority" hacking, since we can check if the extmark is valid in `nvim_buf_get_extmarks()` now.
* Merge #34921 tutor: reimplement interactive marks as extmarksJustin M. Keyes2025-07-17
|\
| * refactor(tutor): reimplement interactive marks as extmark in Luabrianhuster2025-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: From https://matrix.to/#/!cylwlNXSwagQmZSkzs:matrix.org/$Ofj-TFIsEMbp0O9OhE8xuZSNi-nhRLtZTOgs6JRLNrs?via=matrix.org&via=gitter.im&via=mozilla.org In lesson 2.6, users are asked to remove the second, forth and fifth lines with `dd` command, then they are asked to undo twice to make the text go back to original state. But after that, the mark ✗ appears again, which confuses the user because they think they do something wrong. This is a limitation with the current implementation, which is based on line number only. Solution: Reimplement interactive marks as extmarks in Lua. This also make the feature less fragile, as users can remove, add some arbitrary lines without breaking the interactive marks. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | 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>
* | docs(lua): add vim.pack to _meta.lua #34957nikolightsaber2025-07-16
| | | | | | | | | | | | | | Problem: Goto definition to pack.lua does not work Solution: Add pack to _meta.lua Co-authored-by: Nikolai Devolder <nikolai.devolder@yamabiko.eu>
* | vim-patch:9.1.1549: filetype: pkl files are not recognizedChristian Clason2025-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: pkl files are not recognized Solution: detect *.pkl files as pkl filetype, include a filetype plugin (Riley Bruins) References: https://pkl-lang.org/ https://github.com/apple/pkl closes: vim/vim#17751 https://github.com/vim/vim/commit/d128889b306680338dbfb54ccc1ff32dc114165d Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | vim-patch:9.1.1548: filetype: OpenFGA files are not recognizedChristian Clason2025-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: OpenFGA files are not recognized Solution: detect *.fga files as fga filetype, include an fga filetype plugin (Riley Bruins) References: https://github.com/openfga https://marketplace.visualstudio.com/items?itemName=openfga.openfga-vscode closes: vim/vim#17752 https://github.com/vim/vim/commit/0992f62fc18431296d3d5d6ab04317b8de4c76d9 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | fix(lsp): close floating preview window correctly #34946Donatas2025-07-15
| | | | | | | | | | | | | | | | | | Problem: After 28b7c2d (found with bisect) the hover preview window does not close when :edit'ing another file, even when you move the cursor. Solution: Change the BufLeave to target the original buffer, not the preview buffer.
* | feat(term): increase max scrollback to 1000000Lewis Russell2025-07-14
| | | | | | | | | | | | | | | | | | | | | | Problem: Cannot use `nvim_open_term()` to pipe terminal scrollback > 100000 Solution: Increase scrollback limit to 1000000 If there's no technical consequences of doing this, can be set even higher in the future.
* | feat(net): vim.net.request(), :edit [url] #34140Tom Ampuero2025-07-13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Nvim depends on netrw to download/request URL contents. Solution: - Add `vim.net.request()` as a thin curl wrapper: - Basic GET with --silent, --show-error, --fail, --location, --retry - Optional `opts.outpath` to save to a file - Operates asynchronously. Pass an `on_response` handler to get the result. - Add integ tests (requires NVIM_TEST_INTEG to be set) to test success and 404 failure. - Health check for missing `curl`. - Handle `:edit https://…` using `vim.net.request()`. API Usage: 1. Asynchronous request: vim.net.request('https://httpbingo.org/get', { retry = 2 }, function(err, response) if err then print('Fetch failed:', err) else print('Got body of length:', #response.body) end end) 2. Download to file: vim.net.request('https://httpbingo.org/get', { outpath = 'out_async.txt' }, function(err) if err then print('Error:', err) end end) 3. Remote :edit integration (in runtime/plugin/net.lua) fetches into buffer: :edit https://httpbingo.org/get
* refactor(lsp): drop vim.lsp.util._refresh() #33903Yi Ming2025-07-12
| | | | | | | | | | | | | | | Problem: - util._refresh() is only used by `inlay_hint.lua` and `document_color.lua`, and both have their own wrapper functions; - util._refresh() provides unified parameters, but this layer of wrapping is almost meaningless because - document color does not need the range parameter; - inlay hint requires a range parameter, but it is not complicated Therefore, it can be considered redundant. ref https://github.com/neovim/neovim/pull/32887#discussion_r1996413602 Solution: Remove it.
* fix(lua): vim.diff is nil in uv.new_work() thread #34909Justin M. Keyes2025-07-12
| | | | | | | | | | | | | | | | Problem: The "gitsigns" plugin runs `vim.diff` in a thread (`uv.new_work`), but `vim.diff` is nil in that context: Lua callback: …/gitsigns.nvim/lua/gitsigns/diff_int.lua:30: bad argument #1 to 'decode' (string expected, got nil) stack traceback: [C]: in function 'decode' …/gitsigns.nvim/lua/gitsigns/diff_int.lua:30: in function <…/gitsigns.nvim/lua/gitsigns/diff_int.lua:29> Luv thread: …/gitsigns.nvim/lua/gitsigns/diff_int.lua:63: attempt to call field 'diff' (a nil value) Solution: Revert the `stdlib.c` change (set `vim.diff` instead of `vim._diff`).
* refactor(lsp): rename vim.lsp.semantic_tokens start/stop to enable()Yi Ming2025-07-13
|
* refactor(lsp): utility functions for `enable()/is_enabled()`Yi Ming2025-07-13
|
* fix(lsp): prevent flicker in codelens virtual text #34888Jaehwang Jung2025-07-12
| | | | | | | | | | | | | | | Problem: Calling lsp.codelens.refresh() causes transient visual flicker because codelens virtual texts are briefly replaced with "Unresolved lens ..." before being resolved and redrawn. Since refresh() is triggered frequently (e.g., on CursorHold or InsertLeave), this leads to redundant and noisy virtual text updates, even when the final text hasn't changed. Solution: Do not update virtual text for a line if some lenses for that line are not resolved yet. A trade-off is that the user may temporarily see outdated virtual text. However, that's preferable to spamming updates on every refresh.
* refactor(lua): rename vim.diff => vim.text.diff #34864Justin M. Keyes2025-07-12
| | | | | | | | Problem: `vim.diff()` was introduced before we had the `vim.text` module, where it obviously belongs. Solution: Move it.
* fix(health): bad format() call #34904Justin M. Keyes2025-07-12
| | | | | | | | | | Problem: Bad format() call on PUC Lua #34901 Error: Failed to run healthcheck for "vim.health" plugin. Exception: runtime/lua/vim/health/health.lua:89: bad argument #1 to 'format' (string expected, got nil) Solution: Avoid passing nil.
* docs(autocmd): generate events enum type #34883luukvbaal2025-07-12
|
* fix(extui): disable cmdline highlighter when showing a message (#34887)luukvbaal2025-07-12
| | | | | | Problem: When message is moved from message window to cmdline, the cmdline highlighter is not disabled. Solution: Disable the highlighter (and only scroll to bottom when message was moved to pager).
* vim-patch:9.1.1538: tests: string options in gen_opt_test.vim not fully ↵zeertzjq2025-07-11
| | | | | | | | | | | | sorted (#34891) Problem: tests: string options in gen_opt_test.vim aren't fully sorted. Solution: Sort the string options alphabetically. Also make description of 'maxsearchcount' start with lower-case for consistency with other options, update documentation for searchcount(). closes: vim/vim#17720 https://github.com/vim/vim/commit/7306e8fcdb6fd17276b6aafb23a522cefecb5857
* fix(extui): check if buffers/windows exist before deleting (#34886)Tomasz N2025-07-11
| | | | Problem: Disabling vim._extui may try to delete non-existent windows/buffers. Solution: Check that window/buffer is valid before deleting.
* Merge #34558 docsJustin M. Keyes2025-07-10
|\
| * docs: api, pack, events, developJustin M. Keyes2025-07-10
| |
* | vim-patch:9.1.1535: the maximum search count uses hard-coded value 99 (#34873)zeertzjq2025-07-11
|/ | | | | | | | | | | | | Problem: The maximum search count uses a hard-coded value of 99 (Andres Monge, Joschua Kesper) Solution: Make it configurable using the 'maxsearchcount' option. related: vim/vim#8855 fixes: vim/vim#17527 closes: vim/vim#17695 https://github.com/vim/vim/commit/b7b7fa04bf79f2f13ed6e789b76262753da31dde Co-authored-by: Christian Brabandt <cb@256bit.org>
* test(ui/{cmdline,message}2_spec): reduce flakiness/runtime #34875luukvbaal2025-07-10
| | | | | | | | Problem: Storing the configured 'cmdheight' value is scheduled and may happen after cmdline2_spec already entered block_mode. Excessive wait time for expected screen state due to delayed ruler after an error message. Solution: Only schedule storing the user configured 'cmdheight' if v:vim_did_enter is unset. Use regular message instead of error.
* feat(diagnostic): jump to related info location from `open_float` #34837Riley Bruins2025-07-10
| | | | | | This commit allows users to jump to the location specified in a diagnostic's `relatedInformation`, using `gf` from within the `open_float` window. The cursor need only be on line that displays the related info.
* refactor(lsp): simplify multiline semantic token logic #34698Riley Bruins2025-07-10
| | | | This commit makes it so that only one call to `vim.str_byteindex` is needed, at the end of the `end_line`, `end_col` calculations.
* feat(lsp): support `textDocument/colorPresentation` (#34823)Maria José Solano2025-07-10
| | | feat(lsp): support for `textDocument/colorPresentation`
* fix(lsp): custom 'winborder' in make_floating_popup_options() #34868Sebastian Lyng Johansen2025-07-10
|
* docs: move vim.system to own sectionLewis Russell2025-07-10
|
* vim-patch:32a1b26: runtime(filetype): improve asm heuristics and move into ↵zeertzjq2025-07-10
| | | | | | | | | | | | | | | | | | | | FTasmsyntax() (#34863) fixes: vim/vim#17474 closes: vim/vim#17683 https://github.com/vim/vim/commit/32a1b26ef3e821de9b5c518829b08002e933fa5a vim-patch:41ee98c: runtime(filetype): fix incorrect pattern and break early - Using `\n` is incorrect, as result of getline() does not contain line breaks and only uses `\n` for NUL bytes. - Return when b:asmsyntax is set, like many other filetypes. closes: vim/vim#17706 https://github.com/vim/vim/commit/41ee98c3c5342867cb99dfcddbe8d53caeda22db Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
* feat(option): custom chars in 'winborder' #33772glepnir2025-07-09
| | | | | Problem: winborder option only supported predefined styles and lacked support for custom border characters. Solution: implement parsing for comma-separated list format that allows specifying 8 individual border characters (topleft, top, topright, right, botright, bottom, botleft, left).
* feat(extui): use winborder for msg window #34859Sebastian Lyng Johansen2025-07-09
| | | | | | | | | | | Problem: The message window is essentially a regular floating window but does not use 'winborder'. Still some "scratch" buffer options unset after it was removed from its window. Solution: Do not set the border when opening the window message. Forego passing `scratch = true` when opening a buffer, set the options manually when necessary. Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* feat(extui): show dismissed message in cmdline (#34745)luukvbaal2025-07-09
| | | | | | | | | | Problem: An accidental key press can dismiss a routed message to be shown in full before the user was able to read it. 'verbose' message routing based on an outdated condition results in "last_set" messages being separated from its message pair. Solution: Show a message to be shown in full in the cmdline window instead of the pager. Keep it there and update the spill indicator when the message is dismissed. Remove the 'verbose' message routing.
* vim-patch:9.1.1526: completion: search completion match may differ in casezeertzjq2025-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: completion: search completion match may differ in case (techntools) Solution: add "exacttext" to 'wildoptions' value (Girish Palya) This flag does the following: exacttext When this flag is present, search pattern completion (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|) shows exact buffer text as menu items, without preserving regex artifacts like position anchors (e.g., |/\<|). This provides more intuitive menu items that match the actual buffer text. However, searches may be less accurate since the pattern is not preserved exactly. By default, Vim preserves the typed pattern (with anchors) and appends the matched word. This preserves search correctness, especially when using regular expressions or with 'smartcase' enabled. However, the case of the appended matched word may not exactly match the case of the word in the buffer. fixes: vim/vim#17654 closes: vim/vim#17667 https://github.com/vim/vim/commit/93c2d5bf7f01db594a3f5ebecbd5a31dfd411544 Co-authored-by: Girish Palya <girishji@gmail.com>
* docs: tag of `:EditQuery` #34844Phạm Bình An2025-07-08
| | | | | | | | | | Problem: - Running `:h :EditQuery` throws error `E149: Sorry, no help for :EditQuery` - vim_diff.txt miss an entry for `:EditQuery` Solution: - Make tag `[:EditQuery]()` right-aligned, similar to command `:Open` - Update vim_diff.txt
* fix(health): floating window closes when opening TOC (gO) #34794glepnir2025-07-08
| | | | | Problem: Health check floating window gets closed when pressing 'gO' to show TOC because LSP floating preview system auto-closes on BufEnter events triggered by :lopen. Solution: Temporarily disable BufEnter event for the current window during TOC operations and adjust window layout to prevent overlap.
* docs: type fixes #34831phanium2025-07-07
|
* feat(lsp): support diagnostic related information (#34474)Riley Bruins2025-07-07
|
* vim-patch:9.1.1517: filetype: autopkgtest files are not recognizedChristian Clason2025-07-07
| | | | | | | | | | | | | | | | | | Problem: filetype: autopkgtest files are not recognized Solution: detect */debian/tests/control files as autopkgtest filetype (James McCoy) Autopkgtest is a Debian tool for testing installed versions of packages when other, related packages are updated. Reference: - https://www.debian.org/doc/debian-policy/autopkgtest.txt related: vim/vim#17679 https://github.com/vim/vim/commit/5bcc492649f2d810577dd8dc4e1fb92f548847eb Co-authored-by: James McCoy <jamessan@jamessan.com>