aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* | fix(lsp): reuse_win prioritizes windows/tabs currently displayed #36486Toby She2025-11-12
| | | | | | | | | | | | | | | | Problem: reuse_win will always jump to the first window containing the target buffer rather even if the buffer is displayed in the current window/tab Solution: check to see if the buffer is already displayed in the current window or any window of the current buffer
* | vim-patch:9.1.1909: filetype: .mom files recognized as nroff files (#36543)zeertzjq2025-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: .mom files recognized as nroff files Solution: Detect *.mom files as groff filetype instead (Callum Andrew) Reference: - mom macros are written specifically for groff: https://www.schaffter.ca/mom/ closes: vim/vim#18718 https://github.com/vim/vim/commit/23e12c0b7ec02cc374f111fd9dfaa84734dbb7f5 Co-authored-by: Callum Andrew <dev@candrew.net>
* | fix(trust): :trust command on Windows #36509Andrey Starodubtsev2025-11-11
| | | | | | | | | | | | | | | | `:trust` command calculated SHA-256 on file content reading it as a text. While it doesn't matter on Unices, on Windows hash was calculated incorectly. SHA-256 for buffer content was calculated fine though. After this fix hashes in `%LOCALAPPDATA%/nvim-data/trust` are the same as in output of `sha256sum -t`.
* | fix(lsp): check `nvim.lsp.enable` before `doautoall` #36518Maria Solano2025-11-11
| |
* | fix(lsp): check for non-nil buffer state on reset (#36519)Maria Solano2025-11-11
| |
* | vim-patch:9.1.1906: filetype: not all Ruby files are recognized (#36526)zeertzjq2025-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: not all Ruby files are recognized Solution: Detect *.rbi and Brewfile as ruby filetype (botantony). - `rbi` is a file extension used by Sorbet, typechecker for Ruby: https://sorbet.org/docs/rbi - `Brewfile` is a bundler file for Homebrew package manager: https://docs.brew.sh/Brew-Bundle-and-Brewfile closes: vim/vim#18697 https://github.com/vim/vim/commit/efc3be77bbf707edad9cbbda7aef471de65411fd Co-authored-by: botantony <antonsm21@gmail.com>
* | fix(lsp): correct iteration through attached buffers (#36517)Maria Solano2025-11-10
| |
* | feat(lsp): deprecate `vim.lsp.stop_client` (#36459)Olivia Kinnear2025-11-10
| | | | | | | | | | * feat(lsp): deprecate `vim.lsp.stop_client` * fix(tests): fix nil variable in diagnostic_spec.lua
* | fix(lsp): deprecate `vim.lsp.get_buffers_by_client_id` (#36449)Maria Solano2025-11-10
| |
* | refactor(spellfile): config() interface, docs #36481Yochem van Rosmalen2025-11-09
| | | | | | | | | | | | | | | | | | | | | | | | Problem: - Exposing the raw config as table is a pattern not seen anywhere else in the Nvim codebase. - Old spellfile.vim docs still available, no new documentation Solution: - Exposing a `config()` function that both acts as "getter" and "setter" is a much more common idiom (e.g. vim.lsp, vim.diagnostic). - Add new documentation and link old docs to |spellfile.lua| instead of |spellfile.vim|.
* | fix(lsp): don't overlay insertion-style inline completions (#36477)Riley Bruins2025-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(lua): `Range:is_empty()` to check vim.range emptiness * fix(lsp): don't overlay insertion-style inline completions **Problem:** Some servers commonly respond with an empty inline completion range which acts as a position where text should be inserted. However, the inline completion module assumes that all responses with a range are deletions + insertions that thus require an `overlay` display style. This causes an incorrect preview, because the virtual text should have the `inline` display style (to reflect that this is purely an insertion). **Solution:** Only use `overlay` for non-empty replacement ranges.
* | fix(lsp): ignore inline completions after leaving insert mode (#36476)Riley Bruins2025-11-09
| | | | | | | | | | | | | | | | | | **Problem:** When quickly entering and leaving insert mode, sometimes inline completion requests are returned and handled in normal mode. This causes an extmark to be set, which will not get cleared until the next time entering & leaving insert mode. **Solution:** Return early in the inline completion handler if we have left insert mode.
* | vim-patch:c28b73d: runtime(doc): Improve :help synconcealed() descriptionzeertzjq2025-11-09
| | | | | | | | | | | | | | | | closes: vim/vim#18698 https://github.com/vim/vim/commit/c28b73d34990e574ebd7542fe0adb789fc0bd674 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* | fix(ui): cmdline_show is not fired after clearing the screen (#36451)luukvbaal2025-11-08
|/ | | | | | | | | | | | Problem: Resize events during startup may clear an active external cmdline, which is then not redrawn. UI2 VimResized autocommand does not work. UI2 message appearance may be altered by inherited window options. The message separator uses the wrong fillchar. Solution: Unset cmdline_was_last_redrawn when clearing the screen, such that cmdline_show is re-emitted. Ensure set_pos function is called without arguments. Ensure such options are unset. Use 'fillchars'->msgsep.
* fix(treesitter): reset next_col when performing intermediate highlightsRiley Bruins2025-11-06
| | | | | | The iterator is meant to be fully reset in this code path, but only the `next_row` state was being reset. This would only cause highlight artifacts for very brief periods of time, though.
* fix(lsp): don't immediately force shutdown when using a timeout (#36455)Maria Solano2025-11-05
|
* fix(lsp): fix window to set cursor for inline completion (#36444)Folke Lemaitre2025-11-04
|
* vim-patch:9.1.1892: Not possible to know once Vim is done with sourcing ↵zeertzjq2025-11-02
| | | | | | | | | | | | | | | | | | vimrc (#36429) Problem: A plugin does not know when startup scripts were already triggered. This is useful to determine if a function is called inside vimrc or after (like when sourcing 'plugin/' files). Solution: Add the v:vim_did_init variable (Evgeni Chasnovski) closes: vim/vim#18668 https://github.com/vim/vim/commit/294bce21ee837aab209a1008d0efc3e305cf188f Nvim has two more steps between sourcing startup scripts and loading plugins. Set this variable after these two steps. Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
* feat(lsp): support auto-force escalation in client stop (#36378)Maria Solano2025-11-01
|
* vim-patch:9.1.1889: filetype: not all AppleScript files are recognized (#36411)zeertzjq2025-11-01
| | | | | | | | | | | | | | Problem: filetype: not all AppleScript files are recognized Solution: Detect *.applescript files as applescript filetype (Samuel Huang) Reference: https://en.wikipedia.org/wiki/AppleScript closes: vim/vim#18672 https://github.com/vim/vim/commit/69dd5906fd9723774715ec37ad3b44652938f655 Co-authored-by: Samuel Huang <hi@sgh.ng>
* docs: rename l10n help files #36377Justin M. Keyes2025-10-28
|
* fix(filetype): move fallback logic to vim.filetype.match() #30141Jonny Kong2025-10-28
| | | | | | | | | | | | Problem: Previously, the fallback logic to ".conf" was located outside of `vim.filetype.match()` and directly within the AutoCmd definition. As a result, `vim.filetype.match()` would return nil instead of ".conf" for fallback cases (#30100). Solution: Added a boolean return value to `vim.filetype.match()` that indicates whether the match was the result of fallback. If true, the filetype will be set using `setf FALLBACK <ft>` instead of `setf <ft>`.
* vim-patch:9.1.1886: filetype: Android aconfig files are not recognized (#36374)zeertzjq2025-10-29
| | | | | | | | | | | | | Problem: filetype: Android aconfig files are not recognized Solution: Detect *.aconfig files as pbtxt filetype (Bruno Belanyi) Reference: https://source.android.com/docs/setup/build/feature-flagging/declare-flag closes: vim/vim#18656 https://github.com/vim/vim/commit/7adeb09bb24a9d29179926dd391c3d67cea26057 Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
* vim-patch:6be154f: runtime(doc): revert wrong 'incsearch' descriptionzeertzjq2025-10-29
| | | | | | | | | | This reverts commit 3fc00c05fb464d3e806df53bdc1743faa337ddca. related: vim/vim#18639 https://github.com/vim/vim/commit/6be154f5e63d47b9e0e5b709577a8c71aa4e4456 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(health): attempt to concatenate table value #36369Justin M. Keyes2025-10-28
|
* fix(ui2): emit FileType event after setting default pager options #36315yilisharcs2025-10-27
| | | | | | | | | | Problem: Setting a filetype before configuring default options for ui2 buffers (pager, cmd, ...) prevents users from setting their own options. Solution: Call nvim_set_option_value after defaults are set. Closes #36314 Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* fix(lsp): stop repeatedly resuming dead coroutine #35743tao2025-10-27
| | | | | | | | | | Problem: Error extracting content-length causes all future coroutine resumes to fail. Solution: Replace coroutine.wrap with coroutine.create in create_read_loop so that we can check its status and catch any errors, allowing us to stop the lsp client and avoid repeatedly resuming the dead coroutine.
* vim-patch:9.1.1878: filetype: Soy files are not recognized (#36346)zeertzjq2025-10-27
| | | | | | | | | | | Problem: filetype: Soy files are not recognized Solution: Detect *.soy files as soy filetype, include a soy filetype plugin (Riley Bruins) closes: vim/vim#18640 https://github.com/vim/vim/commit/9fff99c3c28083dbe4dcb243309bf2b28c4cb82b Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* vim-patch:9.1.1876: pre-inserted text not exposed in complete_info() (#36342)zeertzjq2025-10-27
| | | | | | | | | | | | | Problem: pre-inserted text not exposed in complete_info() Solution: Add the pre-inserted text to the complete_info() Vim script function (Girish Palya) closes: vim/vim#18571 Feat: expose preinserted text in complete_info() https://github.com/vim/vim/commit/ef5bf58d8cb2c6332d4cbc89c1d352466772ecc3 Co-authored-by: Girish Palya <girishji@gmail.com>
* vim-patch:3fc00c0: runtime(doc): mention that 'incsearch' ignores addresses ↵zeertzjq2025-10-27
| | | | | | | | | | and offset closes: vim/vim#18639 https://github.com/vim/vim/commit/3fc00c05fb464d3e806df53bdc1743faa337ddca Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(lsp): ensure bufnr is passed for buffer-local requests (#36325)skewb1k2025-10-25
| | | | | | | | | | Problem: Some LSP method handlers were making requests without specifying a bufnr, defaulting to 0 (current). This works in most cases but fails when client attaches to background buffers, causing assertions in handlers to fail. Solution: Ensure bufnr is passed to Client.request for buffer-local methods.
* fix(terminal): adjust marks when deleting scrollback lines (#36294)zeertzjq2025-10-25
| | | | This also fixes inconsistent scrolling behavior on terminal output when cursor is in the middle of the buffer and the scrollback is full.
* fix(filetype): handle invalid `bufnr` in _getlines(), _getline() #36272xvzc2025-10-23
| | | | | | | | | | | | | | | **Problem:** `vim.filetype.match({ filename = 'a.sh' })` returns `nil` because an invalid buffer ID is passed to `vim.api.nvim_buf_get_lines()`. For filetypes like `csh`, `txt`, or any other extensions that call `_getlines()` or `_getline()` to detect their filetypes, the same issue occurs. When only the `filename` argument is passed, an error is raised inside a `pcall()` that wraps the filetype detection function, causing it to return no value without showing any error message. **Solution:** Validate the `bufnr` value in `_getlines()` and `_getline()`.
* fix(outline): use 2-space indent instead of 1-spaceJustin M. Keyes2025-10-24
| | | | 2 spaces is more visually distinct at very little cost.
* docs: types, news, lua-pluginJustin M. Keyes2025-10-24
| | | | | | - mention "lua_ls", not "luals". https://github.com/neovim/neovim/discussions/36182 Co-authored-by: Maria Solano <majosolano99@gmail.com>
* Merge #36299 improve PackChanged eventJustin M. Keyes2025-10-23
|\
| * docs(pack): add plugin hooks exampleEvgeni Chasnovski2025-10-23
| | | | | | | | | | | | Problem: No examples of how to use `PackChanged[Pre]` for plugin hooks. Solution: Add examples of creating plugin hooks.
| * fix(pack)!: do not trigger `PackChanged[Pre] kind=update` during installEvgeni Chasnovski2025-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `PackChanged[Pre]` events with `kind=update` are triggered both during plugin's initial installation and after already installed plugin was updated. It was a deliberate decision to allow writing only a single update hook to act as a dedicated "build" entry point (like execute `make` or `cargo build —release`). This mimics how other plugin managers have a single "build" command. This was a result of 'mini.deps' experience with the different approach: "update" hooks are not run during install. This proved to be confusing as it requires to write two hooks. But also the reason might be that 'mini.deps' names it "checkout" hook instead of "update". However, the `vim.pack` event approach makes it lower cost to handle separate "update" and "install" events. Something like `if ev.data.kind == 'install' or ev.data.kind == 'update' then` instead of two autocommands. Plus this makes clearer separation of events. Solution: do not trigger `PackChanged[Pre] kind=update` event during install.
| * feat(pack): add `active` field to `PackChanged` event dataEvgeni Chasnovski2025-10-23
| | | | | | | | | | | | | | | | | | | | Problem: Inside `PackChanged[Pre]` callbacks it might be useful to tell if the affected plugin is active or not. It is already possible via extra `vim.pack.get({ 'plug-name' })[1].active`, but it is not quite user-friendly for something that might be needed frequently in real world use cases. Solution: Supply extra `active` event data field.
* | fix(terminal): wrong row in TermRequest with full scrollback (#36298)zeertzjq2025-10-24
|/ | | | Problem: Wrong row in TermRequest with full scrollback. Solution: Subtract by the number of lines deleted from scrollback.
* fix(lsp): set 'linebreak' in floating windows (#36275)Fredrik Lanker2025-10-22
| | | | | Set linebreak to avoid splitting words. Fix #36268
* fix(ui2): start treesitter after deleting cmdline buffer (#36274)luukvbaal2025-10-22
| | | | Problem: Treesitter is not started in new cmdline buffer after deletion. Solution: Start treesitter when highlighter buffer no longer matches.
* docs(vimfn): getcwd() behavior #36222Robert2025-10-21
|
* fix(lsp): noisy log message when enabling server without config #36264Riley Bruins2025-10-21
| | | | | | | | | | This warning doesn't really make sense, since the `enable()` call is meant to be run before the `lsp.config` calls. It will be logged many times (once for each enabled LSP) at startup. This is especially annoying because calling `enable()` after configuration causes the first opened buffer not to have its filetype set in some situations. This is a separate bug which really needs to be fixed, and makes this superfluous logging more likely.
* fix(lsp): deduplicate completion items #36166Till Bungert2025-10-20
| | | | | | | The current implementation has a race condition where items are appended to the completion list twice when a second completion runs while the first is still going. This hotfix just deduplicates the entire list. Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
* docs(ui): 'pumborder' #36255Maria Solano2025-10-20
|
* fix(lsp): replace `string` types with LSP method alias type annotations ↵David2025-10-16
| | | | | where appropriate. (#36180) fix(lsp): replace `string` types with LSP method alias where appropriate
* fix(lsp): include missing LSP methods and update type annotationsDavidyz2025-10-16
|
* revert "fix(lsp): _get_workspace_folders does not handle root_dir() ↵Mathias Fußenegger2025-10-14
| | | | | | | function" #36183 This reverts commit 97ab24b9c7d9327740f0692f8076fed5737a52dc. See discussion in https://github.com/neovim/neovim/pull/36071
* fix(lsp): "attempt to index nil config" #36189Justin M. Keyes2025-10-15
| | | | | | | | | | | | | | | | | Problem: If a client doesn't have a config then an error may be thrown. Probably caused by: 2f78ff816b03661b5f74d0624e973eaca0d64ef1 Lua callback: …/lsp.lua:442: attempt to index local 'config' (a nil value) stack traceback: …/lsp.lua:442: in function 'can_start' …/lsp.lua:479: in function 'lsp_enable_callback' …/lsp.lua:566: in function <…/lsp.lua:565> Solution: Not all clients necessarily have configs. - Handle `config=nil` in `can_start`. - If user "enables" an invalid name that happens to match a *client* name, don't auto-detach the client.