aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* fix(health): "q" keymap not set when health.style=float #37007glepnir2025-12-17
| | | | | | | Problem: The q keymap is already set in open_floating_preview, so maparg('q') is not empty. Solution: Add a health.style check before setting the q keymap.
* fix(lsp): sort items when completeopt include fuzzy #36974glepnir2025-12-16
| | | | | | | Problem: When fuzzy is enabled and the prefix is not empty, items are not sorted by fuzzy score before calling fn.complete. Solution: Use matchfuzzypos to get the scores and sort the items by fuzzy score before calling fn.complete.
* fix(lsp): simplify semantic tokens range request logic #36950jdrouhard2025-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | By simplifying the way range is supported, we can fix a couple issues as well as making it less complex and more efficient: * For non-range LSP servers, don't send requests on WinScrolled. The semantic tokens module has been reworked to only send one active request at a time, as it was before range support was added. If range is not supported, then send_request() only fires if there's been a change to the buffer's document version. * Cache the server's support of range and delta requests when attaching to a buffer to save the lookup on each request. * Range requests always use the visible window, so just use that for the `range` param when sending requests when range is supported by the server. This reduces the API surface area of send_request(). * Debounce the WinScrolled autocmd requests in the same the way requests are debounced when the buffer contents are changing. Should allow scrolling via mouse wheel or holding down "j" or "k" work a bit smoother. The previous iteration of range support allowed multiple active requests to be in progress simultaneously. However, a bug was preventing any but the most recent request to actually apply to the client's highlighting state so that complexity was unused. It was effectively only using one active request at a time but was just using range requests on WinScrolled events instead of a full (or delta) request when the document version changed.
* fix(lsp): tests for :lsp, rename start/stopOlivia Kinnear2025-12-16
| | | | | | - Rename :lsp start/stop to enable/disable - Move lua section of `:lsp` to `vim/_core` - Add tests
* feat(lsp): builtin :lsp commandbrianhuster2025-12-16
| | | | | | | | | | | | | Problem: - Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) claims to be a "data-only" plugin, in fact it still provides some user-facing commands because they haven't been upstreamed to Nvim. Solution: - Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp restart`, `:lsp start` and `:lsp stop` respectively. Co-authored-by: glepnir <glephunter@gmail.com>
* fix(vim.pack): increase default timeout #36992Ian Beckett2025-12-16
|
* docs: update support.txt (#36903)zeertzjq2025-12-16
|
* docs: misc, editorconfigJustin M. Keyes2025-12-15
| | | | fix https://github.com/neovim/neovim/issues/36858
* fix(lsp): correct capability checks for dynamic registration (#36932)Tristan Knight2025-12-15
| | | | | | Refactor capability checks in Client:_supports_registration and Client:supports_method to properly handle dynamicRegistration and unknown methods. Now, dynamic capabilities are checked before assuming support for unknown methods, ensuring more accurate LSP feature detection.
* fix(health): check shell performance using vim.fn.system() #36980Yochem van Rosmalen2025-12-15
| | | | | | | | | Problem: `vim.system()` doesn't invoke a shell, while the Vimscript function `system()` does. Solution: Revert the change from 35af766de6 and use `vim.fn.system()` again to actually invoke a shell.
* Revert "refactor(treesitter): use scratch buffer for string parser" #36964Riley Bruins2025-12-15
| | | This reverts commit 2a7cb32959b4c616bd2c76ae1933f8e068e391ad.
* vim-patch:9.1.1980: filetype: N-Quads files are not recognized (#36967)zeertzjq2025-12-15
| | | | | | | | | | | | | Problem: filetype: N-Quads files are not recognized Solution: Detect *.nq files as nq filetype Reference: - https://www.w3.org/TR/n-quads/ closes: vim/vim#18923 https://github.com/vim/vim/commit/6c027b25f114595a21fcb5031abe366349ad5a9c Co-authored-by: Gordian Dziwis <gordian@dziw.is>
* fix(treesitter): no injection highlighting on last line #36951Jaehwang Jung2025-12-14
| | | | | | | | | | | | | Problem: If the last visible line in a window is not fully displayed, this line may not get injection highlighting. This happens because line('w$') actually means the last *completely displayed* line. Solution: Use line('w$') + 1 for the botline. This reverts 4244a967746a1476831d990153d4de85450e54d4 "test: fix failing lsp/utils_spec #36609", which changed the test based on the wrong behavior.
* fix(vim.loader): randomized AppImage path pollutes luac cache #36944Shmerl2025-12-14
| | | different approach to 78bbe53f7615e8b38d5289d9ce0579996109579b
* vim-patch:bfb9f5c: runtime(doc): Rename NoDefaultCurrentDirectoryInExePath ↵zeertzjq2025-12-12
| | | | | | | | | | | | tag (#36921) - Add leading "$" to match other environment variable tags. - Clarify :help $NoDefaultCurrentDirectoryInExePath. closes: vim/vim#18895 https://github.com/vim/vim/commit/bfb9f5c40ea5dd07fc0747c5ffd44d5b32dbcf62 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:98a0cbf: patch 9.1.1971: crash with invalid positional argument 0 ↵zeertzjq2025-12-12
| | | | | | | | | | | | in printf() (#36919) Problem: crash with invalid positional argument 0 in printf() Solution: Reject positional arguments <= 0. closes: vim/vim#18898 https://github.com/vim/vim/commit/98a0cbf05bd45fa6c4ede7b791fd21760bc587c8 Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(lsp): warn about unknown filetype #36910Olivia Kinnear2025-12-11
|
* fix(vim.loader): randomized AppImage path pollutes luac cache #35636Shmerl2025-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When using the Nvim appimage, `~/.cache/nvim/luac` directory can grow to 250,000+ files. Example of 2 identical files in `./luac/`: %2ftmp%2f.mount_nvim.a65Rja0%2fusr%2fshare%2fnvim%2fruntime%2flua%2fvim%2ftreesitter.luac %2ftmp%2f.mount_nvim.aNpxXgo%2fusr%2fshare%2fnvim%2fruntime%2flua%2fvim%2ftreesitter.luac Analysis: The `nvim.appimage` mounts nvim at a different temporary path each time it is invoked. The naming scheme of these cache files is random, which defats the purpose of the cache creates N new files on every launch of nvim. Steps to reproduce: 1. install `nvim.appimage` 2. `mv ~/.cache/nvim/luac ~/.cache/nvim/luac.backup` 3. `nvim` 4. Observe contents of `~/.cache/nvim/luac/` 5. Close nvim and run `nvim` again 6. Observe contents of `~/.cache/nvim/luac/` and see that new identical files have been added with a different mount prefix Solution: When running from an appimage, trim the random part of the filepaths.
* fix(lua): relax `vim.wait()` timeout validation #36900skewb1k2025-12-10
| | | | | | | | | Problem: After bc0635a9fc9c15a2423d4eb35f627d127d00fa46 `vim.wait()` rejects floats and NaN values. Solution: Restore the prior behavior, while still supporting `math.huge`. Update tests to cover float case.
* docs(options): shell-powershell #36881ymich99632025-12-10
| | | | | | | | | | Problem: Current options for powershell and pwsh had mistakes and rationale behind them was not clear. Solution: Update the suggested options by splitting up powershell and pwsh, as well as ensuring that all options work and rationale is documented and discussed.
* vim-patch:9.1.1963: diff: missing diff size limit for xdiff (#36877)zeertzjq2025-12-09
| | | | | | | | | | | | | | | | | | | | | | | Problem: diff: missing diff size limit for xdiff Solution: Impose file size limit for internal diff (xdiff) (Yee Cheng Chin). Git imposes a hard cap on file size for content that it passes to xdiff (added to Git in dcd1742e56e, defined in xdiff-interface.h), due to integer overflow concerns in xdiff. Vim doesn't specify such a limit right now, which means it's possible for a user to diff a large file (1GB+) and trigger these overflow issues. Add the same size limit (1GB minus 1MB) to Vim and simply throws an error when Vim encounters files larger than said limit. For now, reuse the same error message regarding internal diff failures. There is no need to add the same limit for external diff as it's up to each tool to error check their input to decide what is appropriate or not. closes: vim/vim#18891 https://github.com/vim/vim/commit/4af6d9755cba0dd07e881172f2a6e0efe9986ddc Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* Revert "feat(lsp): support `version` in `textDocument/publishDiagnostics` ↵Mathias Fußenegger2025-12-09
| | | | | | | | | #36754" (#36865) This reverts commit 03d6cf7aae4a72c7221a4fb8ebb14a7c8603ba18. See https://github.com/neovim/neovim/pull/36754#issuecomment-3626115697 The change was supposed to avoid showing stale diagnostics but had the opposite effect.
* fix(lsp): fix incorrect params because of typo (#36871)Pig Fang2025-12-08
|
* fix(exrc): ensure consistent 'exrc' loading sequence #35148€šm̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰�Ř§Ů Â£╟©舐æØ¢£ðsÞ¥¿—2025-12-08
| | | | | | | | | | Problem: The execution of startup scripts in parent directories are too late compared to scripts in current direcctory. Solution: Execute all startup scripts with `lua/_core/exrc.lua`. closes: #35147
* vim-patch:9.1.1962: filetype: Erlang application resource files are not ↵zeertzjq2025-12-09
| | | | | | | | | | | | | | recognized (#36868) Problem: filetype: Erlang application resource files are not recognized Solution: Add content-based filetype detection for application resource files matching extension '*.app' (Doug Kearns) related: vim/vim#18835 closes: vim/vim#18842 https://github.com/vim/vim/commit/cf5c25526007a5cc39be317b023f55cb266d5ed2 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* feat(events): MarkSet event, aucmd_defer() #35793Nathan Smith2025-12-07
| | | | | | | | | | | | Problem: - Can't subscribe to "mark" events. - Executing events is risky because they can't be deferred. Solution: - Introduce `MarkSet` event. - Introduce `aucmd_defer()`. Helped-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* docs: miscJustin M. Keyes2025-12-06
| | | | | | fix https://github.com/neovim/neovim.github.io/issues/419 Co-authored-by: Rob Pilling <robpilling@gmail.com>
* feat(lsp): support dynamic registration for diagnostics (#36841)Tristan Knight2025-12-06
|
* refactor(lsp): unify capability checks and registration #36781Tristan Knight2025-12-06
| | | | | | | Problem: Our LSP type system didnt have a concept of RegistrationMethods, this is where the method to dynamically register for a capability is sent to a different method endpoint then is used to call it. Eg `textDocument/semanticTokens` rather than the specific full/range/delta methods Solution: Extended generator to create `vim.lsp.protocol.Methods.Registration` with these registration methods. Also extend `_request_name_to_client_capability` to cover these methods. Adjust typing to suit
* vim-patch:9.1.1957: filetype: bpftrace files are not recognized (#36838)zeertzjq2025-12-06
| | | | | | | | | | | Problem: filetype: bpftrace files are not recognized Solution: Detect *.bt files as btftrace filetype, include a btftrace filetype plugin (Stanislaw Gruszka) closes: vim/vim#18866 https://github.com/vim/vim/commit/b60b33a9dc91569f803e5a4856244bd8414f1802 Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
* refactor(lsp): fix lintPig Fang2025-12-05
|
* feat(lsp): support refreshing workspace diagnosticsPig Fang2025-12-05
|
* refactor(lsp): simplify handling diagnostic "on_refresh"Pig Fang2025-12-05
|
* feat(lsp): support diagnostic refresh requestPig Fang2025-12-05
|
* fix: update lua types for commandsRob Pilling2025-12-05
|
* feat(lsp): `Client:stop()` defaults to `exit_timeout` #36783Olivia Kinnear2025-12-04
| | | | | | | | | Problem: If a `vim.lsp.config` explicitly sets `exit_timeout`, that indicates the config wants that behavior for most usages of `:stop()`. Solution: Update `:stop()` to use `force=exit_timeout` if `force` was not explicitly passed.
* fix(ui): close outdated cmdline pum on redraw (#36815)zeertzjq2025-12-05
|
* vim-patch:9.1.1944: getwininfo() does not return if statusline is visible ↵zeertzjq2025-12-05
| | | | | | | | | | | | | (#36828) Problem: gewininfo() does not return if statusline is visible Solution: Add status_height to the dict items returned by getwininfo() (Hirohito Higashi) closes: vim/vim#18841 https://github.com/vim/vim/commit/a04ab5f04c1a9e794ed45ff5f8f7e1f9c5e1a535 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1948: Windows: Vim adds current directory to search pathzeertzjq2025-12-04
| | | | | | | | | | | | | | | | Problem: Windows: Vim always adds the current directory to search path. This should only happen when using cmd.exe as 'shell'. For example, powershell won't run binaries from the current directory. Solution: Only add current directory to system path, when using cmd.exe as 'shell'. related: vim/vim#10341 related: 083ec6d9a3b7 https://github.com/vim/vim/commit/4d87c9742a544a58c05cb34d4fbaac47e410b369 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1947: [security]: Windows: Vim may execute commands from ↵zeertzjq2025-12-04
| | | | | | | | | | | | | | | | current directory Problem: [security]: Windows: Vim may execute commands from current directory (Simon Zuckerbraun) Solution: Set the $NoDefaultCurrentDirectoryInExePath before running external commands. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834 https://github.com/vim/vim/commit/083ec6d9a3b7b09006e0ce69ac802597d25856d6 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(lsp): default ClientConfig.exit_timeout to false #36811Olivia Kinnear2025-12-03
|
* fix(lsp): close timer when client exits (#36795)zeertzjq2025-12-03
| | | | | | | Also, don't start the timer at all when a previous shutdown failed, as in this case a forced shutdown is used and no timer is needed. This fixes most of the delays caused by #36750. The delays caused by #36378 still seem to remain.
* fix(health): bug-report formatting, version check #36809Justin M. Keyes2025-12-02
| | | | | | | | | Problem: Version check failed because of "equality" comparison, so a version string of "123abc" would not match "123abcdef". Solution: - Adjust verison check. - Improve bug-report formatting.
* fix(treesitter): missing `nowait` for :InspectTree keymaps #36804Chris Grieser2025-12-02
|
* vim-patch:c3cfdef: runtime(doc): clarify the use of v:errormsg (#36789)zeertzjq2025-12-02
| | | | | | | fixes: vim/vim#18825 https://github.com/vim/vim/commit/c3cfdefdeee3928671809a20f86ddc5d0fe4cc74 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(lsp): handle nil request in semantic tokens #36780Tristan Knight2025-12-01
| | | | | | Allow the `request` parameter in `tokens_to_ranges` to be `nil` and update version checking logic accordingly. This prevents errors when the request is not present and improves robustness of semantic token handling.
* feat(lsp): graduate ClientConfig `exit_timeout` #36750Olivia Kinnear2025-11-30
| | | | | | | | Problem: The `flags` field calls its sub-fields "experimental". But `exit_timeout` is now used for multiple purposes. Solution: Graduate `exit_timeout` to a top-level ClientConfig field.
* vim-patch:9.1.1936: filetype: Erlang lexical files are not recognizedzeertzjq2025-12-01
| | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Erlang lexical files are not recognized Solution: Detect *.xrl files as leex filetype, include syntax and filetype plugins (Jon Parise). leex is the lexical analyzer generator for Erlang. Its input file format follows a section-based structure and uses the `.xrl` file extension. This initial work includes file detection, an ftplugin (which inherits the Erlang configuration), and a syntax definition. Reference: - https://www.erlang.org/doc/apps/parsetools/leex.html related: vim/vim#18819 closes: vim/vim#18832 https://github.com/vim/vim/commit/b087c5452b4c12bfc9e7f6cecbee34aab64c92d8 Co-authored-by: Jon Parise <jon@indelible.org>
* vim-patch:9.1.1935: filetype: not all Erlang files are recognizedzeertzjq2025-12-01
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: not all Erlang files are recognized Solution: Detect *.app.src and rebar.config files as erlang filetype (John Parise). *.app.src files contain Erlang application definitions. (There are also *.app files, which are similar but more often build artifacts, and that file extension is too ambiguous to be recognized by default.) Reference: - https://www.erlang.org/doc/system/applications.html Rebar is the Erlang build tool. rebar.config uses Erlang syntax. Reference: - https://rebar3.org/docs/configuration/configuration/ closes: vim/vim#18835 https://github.com/vim/vim/commit/2b2580e61a853617173f907bd42e12a073cf2410 Co-authored-by: Jon Parise <jon@indelible.org>
* feat(lsp): semanticTokens/range #36705Tristan Knight2025-11-30
| | | | | | | | | | | | Problem: Nvim supports `textDocument/semanticTokens/full` and `…/full/delta` already, but most servers don't support `…/full/delta` and Nvim will try to request and process full semantic tokens response on every buffer change. Even though the request is debounced, there is noticeable lag if the token response is large (in a big file). Solution: Support `textDocument/semanticTokens/range`, which requests semantic tokens for visible screen only.