aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fix(repeat_cmdline): Save the repeat_cmdline when calling a userfunc.userregs_2Josh Rahm2025-04-16
| | | | | | | | | | | | | | | | There's a very subtle bug when calling a userfunc where the redo buffer is saved, but the repeat_cmdline is not. This causes the redo buffer on do-repeat to call the most recently executed userfunc rather than the userfunc it should be dot-repeating. This is only an issue when trying to dot-repeat a userfunction within a user function. I found this bug when experimenting with using text motions, specifically the Z* verbs in fieldmarshal. Specifically the Z* motions (for inserting/appending before/after a text object) would be dot-repeatable for builtin text objects, but would not be dot-repeatable for user-defined text objects.
* feat(userregfunc): programmable user-defined registers with multibyte supportJosh Rahm2025-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new global option `userregfunc`, allowing users to define custom behavior for registers not handled by Neovim internally. This enables programmable registers using any Unicode character — including multibyte characters. - A new register slot `USER_REGISTER` is introduced. Any register not matching the standard set (`0-9a-zA-Z"+-*%#/:.=`, etc.) is routed through this system. - When such a register is accessed, the function defined in `userregfunc` is called with three arguments: 1. `{action}` (string): either `"yank"` or `"put"` 2. `{register}` (string): UTF-8 character name of the register 3. `{content}`: - If `action == "yank"`: a dictionary with these keys: - `lines` (list of strings): the yanked text - `type` (string): one of `"v"` (charwise), `"V"` (linewise), or `"b"` (blockwise) - `width` (number, optional): present if `type == "b"` - `additional_data` (dict, optional): user-extensible metadata - If `action == "put"`: this is always `v:null` - The function may return either: - A **string** (used as a charwise register), or - A **dictionary** matching the structure above - Internally, `read_userregister()` and `write_userregister()` convert between `yankreg_T` and typval dictionaries. - Messages and internal logic fully support multibyte register names via UTF-8. - A new `USER_REGISTER` slot is used for logical separation in the register table. Included in this patch is an extensible Lua framework (`vim.userregs`) for defining user register handlers in Lua. It provides per-register handlers via `register_handler(registers, handler)` The global function `_G.def_userreg_func` is registered as the default implementation of `'userregfunc'`, enabling seamless integration with the Lua framework. - Register `λ` dynamically inserts the current date - Register `&` reads and writes from a "global register" file under `stdpath("run")` - Register `?` returns the result of a shell command - Registers that auto-adjust based on filetype, cursor context, or Treesitter nodes This change expands the register model into a programmable abstraction — fully scriptable and extensible — without breaking compatibility.
* fix(lsp): "bold" border for vim.lsp.buf.hover #33395Siddhant Agarwal2025-04-09
| | | | | | Problem: vim.lsp.buf.hover allows a bold border size which hasn't been defined Solution: Define the bold border size for vim.lsp.buf.hover
* feat(health): summary in section heading #33388Yochem van Rosmalen2025-04-09
| | | | | | | | Problem: As checkhealth grows, it is increasingly hard to quickly glance through the information. Solution: Show a summary of ok, warn, and error outputs per section.
* vim-patch:7517a8c: runtime(lf): improve syntax script, add filetype pluginChristian Clason2025-04-09
| | | | | | | | | | | | | | | - Greatly improve detection and highlighting of command/shell regions, input-device key labels, escape sequences (@joelim-work) - Add ftplugin for formatoptions, toggling comment areas (@andis-sprinkis) - Add a few missing lf option keywords, rm. old non-working code, misc. formatting (@andis-sprinkis) closes: vim/vim#17078 https://github.com/vim/vim/commit/7517a8cadfd0e70d0422955cbad4767f6a40f29d Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
* vim-patch:9.1.1288: Using wrong window in ll_resize_stack() (#33397)zeertzjq2025-04-09
| | | | | | | | | | Problem: Using wrong window in ll_resize_stack() (after v9.1.1287) Solution: Use "wp" instead of "curwin", even though they are always the same value. Fix typos in documentation (zeertzjq). closes: vim/vim#17080 https://github.com/vim/vim/commit/b71f1309a210bf8f61a24f4eda336de64c6f0a07
* fix(editor): respect [+cmd] when executing :drop #33339jyn2025-04-08
| | | | | | | | | | | | | | Problem: Normally, `:drop +41 foo.txt` will open foo.txt with the cursor on line 41. But if foo.txt is already open, it instead is a no-op, even if the cursor is on a different line. Steps to reproduce: nvim --clean foo.txt :drop +30 foo.txt Solution: Handle +cmd in ex_drop().
* fix(display): scroll redrawing doesn't account for virt_lines above fold #33374luukvbaal2025-04-08
| | | | | | Problem: Logic computing the new height of the modified area does not take into account virtual lines attached to a folded line. Solution: Remove `hasFolding()` branch and let `plines_win_full()` do its job.
* Merge pull request #33381 from zeertzjq/vim-9.1.1283zeertzjq2025-04-08
|\ | | | | vim-patch:9.1.{1253,1283,1287}
| * vim-patch:9.1.1287: quickfix code can be further improvedzeertzjq2025-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: quickfix code can be further improved (after v9.1.1283) Solution: slightly refactor quickfix.c (Hirohito Higashi) - remove error message output - adjust comments - rename functions: - qf_init_quickfix_stack() --> qf_init_stack() - qf_resize_quickfix_stack() --> qf_resize_stack() - qf_resize_stack() --> qf_resize_stack_base() Now qf_alloc_stack() can handle both quickfix/location lists. closes: vim/vim#17068 https://github.com/vim/vim/commit/adcfb6caeb1c9c54448fff8d5812c3dca2ba0d03 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
| * vim-patch:9.1.1283: quickfix stack is limited to 10 itemszeertzjq2025-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: quickfix and location-list stack is limited to 10 items Solution: add the 'chistory' and 'lhistory' options to configure a larger quickfix/location list stack (64-bitman) closes: vim/vim#16920 https://github.com/vim/vim/commit/88d41ab270a8390a43da97a903b1a4d76b89d330 Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com> Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
| * vim-patch:9.1.1253: abort when closing window with attached quickfix datazeertzjq2025-04-08
|/ | | | | | | | | | | | | | | | | | | Problem: If win_close() is called with a window that has quickfix stack attached to it, the corresponding quickfix buffer will be closed and freed after the buffer was already closed. At that time curwin->w_buffer points to NULL, which the CHECK_CURBUF will catch and abort if ABORT_ON_ERROR is defined Solution: in wipe_qf_buffer() temporarily point curwin->w_buffer back to curbuf, the window will be closed anyhow, so it shouldn't matter that curbuf->b_nwindows isn't incremented. closes: vim/vim#16993 closes: vim/vim#16985 https://github.com/vim/vim/commit/ce80c59bfd3c0087a354ee549639ca60fa192fba Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1286: filetype: help files not detected when 'iskeyword' ↵zeertzjq2025-04-08
| | | | | | | | | | | includes ":" (#33377) Problem: Help files not detected when 'iskeyword' includes ":". Solution: Do not use \< and \> in the pattern (zeertzjq). fixes: vim/vim#17069 closes: vim/vim#17071 https://github.com/vim/vim/commit/e370141bf41919642061ee2e78340dca84678712
* vim-patch:2ffb4d0: runtime(lua): fix whitespace style issues in lua ftplugin ↵zeertzjq2025-04-08
| | | | | | | | | (#33378) related: vim/vim#17049 https://github.com/vim/vim/commit/2ffb4d0298426f6c57f3ec3caae4480024e4372d Co-authored-by: Christian Brabandt <cb@256bit.org>
* ci(deps): bump lua-language-server to 3.14.0Christian Clason2025-04-07
|
* fix(decor): enable decoration provider in on_start #33337luukvbaal2025-04-07
| | | | | | | | Problem: An on_win-disabled decoration provider is left disabled for the on_buf callback during the next redraw (if the provider does not subscribe to on_end). Solution: Move re-activation of the provider from after the on_end callback to before the on_start callback.
* fix(treesitter): not refreshing virtualtext contents #33361Dmitry Zolotukhin2025-04-07
| | | | | | | | Problem: In some cases, when treesitter is enabled, deleting a line below virtualtext will not refresh all updated lines. https://github.com/neovim/neovim/issues/33358 Solution: Revert a part of https://github.com/neovim/neovim/pull/31324 to ensure that the full range (with virtual lines) is refreshed.
* docs: PR template #33109Maria José Solano2025-04-07
|
* build(deps): bump luajit to e0a7ea8a9Christian Clason2025-04-07
|
* fix(health): expecting nonexistent "inotifywait" function #33312Felipe Lema2025-04-07
| | | | | | | Problem: 55e4301036bb938474fc9768c41e28df867d9286 changed the program name but not the function name. Solution: Fix the healthcheck.
* fix(defaults): keywordprg=:help on Windows #33336Emanuel Krollmann2025-04-07
| | | | | | | | | | Problem: As `:h kp` says, the default value for keywordprg should be ':help' on Windows. It is currently always ':Man'. Solution: Add condition to options.lua which sets keywordprg to ':help' if running on windows.
* vim-patch:00b927b: runtime(lua): improve foldexpr, add vim9 script versionChristian Clason2025-04-07
| | | | | | | | closes: vim/vim#17049 https://github.com/vim/vim/commit/00b927b295c11e61942d34f7e1c384f1c6af9513 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* vim-patch:9cd6d82: runtime(fstab): set formatoptions-=t in filetype pluginChristian Clason2025-04-07
| | | | | | | | | closes: vim/vim#17020 https://github.com/vim/vim/commit/9cd6d82fbb1693aff2878d851571aa0126b3cb38 Co-authored-by: Radu Dineiu <radu.dineiu@gmail.com> Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9adb310: runtime(svelte): add matchit support to svelte filetype ↵Christian Clason2025-04-07
| | | | | | | | | | plugin closes: vim/vim#17052 https://github.com/vim/vim/commit/9adb310cf34be232c8d71a93cabdf76b7f71a9cb Co-authored-by: 231tr0n <zeltronsrikar@gmail.com>
* ci: bump actions/create-github-app-token from 1 to 2dependabot[bot]2025-04-06
| | | | | | | | | | | | | | | Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1 to 2. - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Commits](https://github.com/actions/create-github-app-token/compare/v1...v2) --- updated-dependencies: - dependency-name: actions/create-github-app-token dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* refactor(lsp): deprecate client_is_stopped #33342Justin M. Keyes2025-04-06
| | | | | | | | Problem: `client_is_stopped(…)` is an alias for `not get_client_by_id(…)`. And it's not used anywhere in our codebase. Solution: Deprecate it.
* fix(vim.hl): nvim_buf_del_extmark on invalid buffer #33331phanium2025-04-05
| | | | | | | Problem: nvim_buf_del_extmark error if buffer is destroyed before timer stops Solution: check nvim_buf_is_valid.
* build: bump NVIM_API_LEVEL #33340Justin M. Keyes2025-04-05
| | | | | Bumping NVIM_API_LEVEL is pretty much required after every major release, because it's also used to correlated Lua stdlib changes to a Nvim version.
* docs: clipboard, eval #33223Justin M. Keyes2025-04-05
|
* vim-patch:9.1.1276: inline word diff treats multibyte chars as word char ↵zeertzjq2025-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#33323) Problem: inline word diff treats multibyte chars as word char (after 9.1.1243) Solution: treat all non-alphanumeric characters as non-word characters (Yee Cheng Chin) Previously inline word diff simply used Vim's definition of keyword to determine what is a word, which leads to multi-byte character classes such as emojis and CJK (Chinese/Japanese/Korean) characters all classifying as word characters, leading to entire sentences being grouped as a single word which does not provide meaningful information in a diff highlight. Fix this by treating all non-alphanumeric characters (with class number above 2) as non-word characters, as there is usually no benefit in using word diff on them. These include CJK characters, emojis, and also subscript/superscript numbers. Meanwhile, multi-byte characters like Cyrillic and Greek letters will still continue to considered as words. Note that this is slightly inconsistent with how words are defined elsewhere, as Vim usually considers any character with class >=2 to be a "word". related: vim/vim#16881 (diff inline highlight) closes: vim/vim#17050 https://github.com/vim/vim/commit/9aa120f7ada592ed03b37f4de8ee413c5385f123 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:b8d5c85: runtime(doc): update WinScrolled documentation (#33322)zeertzjq2025-04-05
| | | | | | | closes: vim/vim#17036 https://github.com/vim/vim/commit/b8d5c8509998f3a97ffe42f674352b07749cd119 Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(lsp.util): deprecate vim.lsp.util.stylize_markdownLewis Russell2025-04-04
| | | | It's not used anywhere.
* fix: bug in stylize_markdownLewis Russell2025-04-04
| | | | `stripped` and `markdown_lines` are iterated together so must have the same length.
* fix(messages): verbose message emitted without kind #33305luukvbaal2025-04-04
| | | | | Problem: Successive autocmd verbose messages may be emitted without a kind. Solution: Always set the kind when preparing to emit a verbose message.
* feat(defaults): store spellfile in stdpath('data') #33048Yochem van Rosmalen2025-04-04
| | | | | | | | | | | Problem: First rtp directory is unpredictable and not in line with XDG base spec. Solution: Use stdpath('data')/spell as directory if 'spellfile' is not set. Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:9.1.1271: filetype: Power Query files are not recognizedChristian Clason2025-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Power Query files are not recognized Solution: detect '*.pq' as pq filetype, include pq syntax and filetype plugin (Anarion Dunedain) Microsoft Power Query provides a powerful data import experience that encompasses many features. Power Query works with desktop Analysis Services, Excel, and Power BI workbooks, in addition to many online services, such as Fabric, Power BI service, Power Apps, Microsoft 365 Customer Insights, and more. A core capability of Power Query is to filter and combine, that is, to mash-up data from one or more of a rich collection of supported data sources. Any such data mashup is expressed using the Power Query M formula language. The M language is a functional, case sensitive language similar to F#. Reference: - Power Query M formula language overview: https://learn.microsoft.com/en-us/powerquery-m/ closes: vim/vim#17045 https://github.com/vim/vim/commit/e74ec3f523a152f62a37cc3ab476f0e5a2e812c6 Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
* vim-patch:6099db9: runtime(sh): Update syntax file, command substitution ↵Christian Clason2025-04-04
| | | | | | | | | | | | | | | | opening paren at EOL Allow the opening parenthesis of a command substitution to appear at EOL. This fixes the issue raised in https://github.com/vim/vim/issues/17026#issuecomment-2774112284. closes: vim/vim#17044 https://github.com/vim/vim/commit/6099db9a60d1c047bf9c8feee3e1689c4e653250 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* Merge pull request #33282 from glepnir/vim-9.1.1269zeertzjq2025-04-04
|\ | | | | vim-patch:9.1.{1269,1272}
| * vim-patch:9.1.1272: completion: in keyword completion Ctrl_P cannot go back ↵glepnir2025-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after Ctrl_N Problem: completion: in keyword completion Ctrl_P cannot go back after Ctrl_N Solution: in find_compl_when_fuzzy() always return first match of array, after Ctrl_P use compl_shown_match->cp_next instead of compl_first_match. (glepnir) closes: vim/vim#17043 https://github.com/vim/vim/commit/3e50a28a03d136c1e0c1f4fabe50d97faaf08c5c Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.1269: completion: compl_shown_match is updated when starting ↵glepnir2025-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keyword completion Problem: compl_shown_match is updated when starting keyword completion and does not include fuzzy matching. Solution: Do not update compl_shown_match when starting keyword completion, since it is the one already selected by the keyword completion direction. (glepnir) closes: vim/vim#17033 https://github.com/vim/vim/commit/e4e4d1c381e9d0af55f6111e9bcaf98ad60461fc Co-authored-by: glepnir <glephunter@gmail.com>
* | test(plugin/shada_spec): failure if timezone isn't a whole hour ahead of UTC ↵tstsrt2025-04-04
| | | | | | | | | | | | | | | | | | (#33257) Problem: When running functional tests locally, test `syntax/shada.vim works` fails if the local timezone is not a whole number of hours ahead of UTC. Solution: Use '!%M' for minute format so that UTC is used in the expected timestamp instead of the local timezone, just like '%H' for hours.
* | test(lua/hl_spec): fix hang on exit with ASAN (#33298)zeertzjq2025-04-04
| |
* | docs(diagnostic): mention `severity` in `Opts.VirtualLines` (#33293)Evgeni Chasnovski2025-04-03
| | | | | | | | | | | | | | Problem: `severity` field is recognized by `vim.diagnostic.Opts.VirtualLines`, but it is not explicitly documented. Solution: document it.
* | feat(vim.hl): allow multiple timed highlights simultaneously #33283Siddhant Agarwal2025-04-03
| | | | | | | | | | | | | | | | | | Problem: Currently vim.hl.range only allows one timed highlight. Creating another one, removes the old one. Solution: vim.hl.range now returns a timer and a function. The timer keeps track of how much time is left in the highlight and the function allows you to clear it, letting the user decide what to do with old highlights.
* | test(lua/secure_spec): fix failure with long path (#33280)zeertzjq2025-04-03
| | | | | | Ref #33278
* | feat(clipboard): g:clipboard="foo" forces the "foo" clipboard tool #33235Deveshi Dwivedi2025-04-03
| |
* | vim-patch:9.1.1268: filetype: dax files are not recognizedChristian Clason2025-04-03
|/ | | | | | | | | | | | | | | | | | | | | Problem: filetype: dax files are not recognized Solution: detect "*.dax" as dax filetype, include dax filetype and syntax plugin (Anarion Dunedain) Data Analysis Expressions (DAX) is a formula expression language used in Analysis Services, Power BI, and Power Pivot in Excel. DAX formulas include functions, operators, and values to perform advanced calculations and queries on data in related tables and columns in tabular data models. DAX language overview: - https://learn.microsoft.com/en-us/dax/dax-overview closes: vim/vim#17035 https://github.com/vim/vim/commit/7f518e044fbc60cffdf2c0f611cc8c4dc35c338c Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
* Merge pull request #33279 from zeertzjq/vim-8293574zeertzjq2025-04-03
|\ | | | | vim-patch: zip plugin updates
| * vim-patch:a359c9c: runtime(zip): add *.whl to the list of zip extensionszeertzjq2025-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commits adds the extension *.whl to the list of zip extensions. Wheel (WHL) files are binary distribution files for python packages. Reference: https://packaging.python.org/en/latest/specifications/binary-distribution-format/ fixes: vim/vim#17038 https://github.com/vim/vim/commit/a359c9c25e5c3c1e543fc720223aa7256e6f72cf Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:8293574: runtime(doc): update pi_zip.txt with current list of zip ↵zeertzjq2025-04-03
|/ | | | | | | | | | file extensions closes: vim/vim#17037 https://github.com/vim/vim/commit/8293574c8b116382ed6e0c3c709a04406f07cfd5 Co-authored-by: Christian Brabandt <cb@256bit.org>