969 Commits

Author SHA1 Message Date
Jan Edmund Lazo b07e853f79 build(vim-patch): AGENTS.md is N/A #39490
Neovim did not port it from Vim.
Vim must design its AGENTS.md only for itself, ignoring Neovim,
for optimal AI behavior.
2026-04-29 07:07:30 -04:00
zeertzjq c33e60f748 revert: "vim-patch:9.2.0405: when jumping to tags, will open URLs (#39461)" (#39487)
This reverts commit 72bc6c5801.

Fix #39480
2026-04-28 23:18:02 +00:00
Jan Edmund Lazo 689c824ef7 vim-patch:8.2.2128: there is no way to do something on CTRL-Z (#39440)
Problem:    There is no way to do something on CTRL-Z.
Solution:   Add VimSuspend and VimResume autocommand events. (closes vim/vim#7450)

https://github.com/vim/vim/commit/100118c73ac068137cd298d22953896242752523

----

Nvim implemented these events first and has enough tests.
test_suspend.vim relies on Vim 'terminal' feature.
Treat it as N/A even if all tests could be ported as Lua functional
screen/terminal tests.

----

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-27 03:57:01 +00:00
Jan Edmund Lazo f8f95ee412 build(vim-patch): update N/A test files (#39405)
* build(vim-patch): test_clientserver.vim is N/A

Requires 'job' and 'clientserver' features.
Both N/A for Neovim.

* build(vim-patch): test_gui_init.vim is N/A

Starts with command 'CheckCanRuiGui' .
Nvim doesn't support ':gui' (yet).

* build(vim-patch): test_plugin_vimball.vim is N/A

Run ':h vimball'.

* build(vim-patch): test_remote.vim is N/A

Needs 'clientserver', 'terminal' features.

* build(vim-patch): test_short_sleep.py is for test_terminal.vim. Both N/A

* build(vim-patch): mark N/A files from test_crypt.vim

* build(vim-patch): mark N/A file for test_terminal3.vim

* build(vim-patch): mark N/A files channel/terminal/vim9 tests
2026-04-26 06:31:19 +08:00
bfredl fe60268258 Merge pull request #39076 from bfredl/zig0.16
IT IS HAPPENING: Zig 0.16
2026-04-21 20:09:57 +02:00
zeertzjq ac8459a09c fix(substitute): don't crash with very large count (#39272) 2026-04-21 11:38:15 +00:00
bfredl 52693e7af3 fix(build): more changes to make zig 0.16.0 work 2026-04-21 12:46:01 +02:00
Justin M. Keyes a38451be40 fix(excmd): nlua_call_excmd require() failure is a "lua_error"
Although `nlua_call_excmd` is semantically for implementing Ex-commands,
the `require()` should never fail, so that's a "Lua error".

But if the call itself fails (the later `semsg` call), that's an "Ex
cmd" error.
2026-04-20 02:31:09 +02:00
Justin M. Keyes 3ebfa2a3cb feat(vimfn): use Lua for more excmds/vimfns
Problem:
Too much boilerplate needed to use Lua to impl an excmd or f_xx
function.

Solution:
- Add `nlua_call_vimfn` which takes the args typval, executes
  Lua, and returns a typval.
- refactor(excmd): lua impl for :log, :lsp
2026-04-18 16:57:37 +02:00
Justin M. Keyes bc6d946cca test: lint EXX error codes #8155
Problem:
- Choosing a new EXX error code is tedious.
- It's possible to accidentally use an EXX error code for different
  purposes.

Solution:
Add a lint check which requires EXX error codes to have a :help tag.
This also avoids duplicates because `make doc` does `:helptags ++t doc`
which fails if duplicates are found.
2026-04-16 10:48:11 -04:00
Justin M. Keyes 11a1ec7df3 test: lint naming conventions #39117
Problem:
Naming conventions are not automatically checked.

Solution:
Add a check to the doc generator. Eventually we should extract this
somehow, but that will require refactoring the doc generator...

Note: this also checks non-public functions, basically anything that
passes through `gen_eval_files.lua` and `gen_vimdoc.lua`. And that's
a good thing.
2026-04-16 09:35:58 -04:00
Olivia Kinnear 87c3d519aa feat(build): rename io.neovim.nvim to org.neovim.nvim 2026-04-14 11:13:03 -05:00
Olivia Kinnear 5181b8952c fix(build): fix make appimage 2026-04-14 11:09:19 -05:00
Jan Edmund Lazo 56fe6713ca vim-patch:8.2.0904: assuming modifyOtherKeys for rhs of mapping (#38970)
Problem:    Assuming modifyOtherKeys for rhs of mapping.
Solution:   Ignore seenModifyOtherKeys for mapped characters. (closes vim/vim#6200)

https://github.com/vim/vim/commit/46cd43bda102c3782bba1c4c629836e010734d77

----

"getchar.c" changes depend on patch 8.1.2145.
Can't port it due to tests.
"test_gui.vim" doesn't depend on GUI for all tests.

----

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-12 07:07:16 +08:00
Jan Edmund Lazo 828b91495c vim-patch:8.2.0898: missing help for a function goes unnoticed
Problem:    Missing help for a function goes unnoticed.
Solution:   Add a test. (Gary Johnson)

https://github.com/vim/vim/commit/6b0e528368415476bfc3a8414c9c70f9852b1517

----

Test relies on parsing runtime/doc/*.txt and src/evalfunc.c .
Error-prone because Vim and Nvim diverged on both documentation
and source code in spite of ported Vim patches.
Importing src/nvim/eval.lua is an alternative
but it uses associatve index such that it's unsorted.

Treat it as N/A because I can't rewrite any of its tests
under minimal effort.

----

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-11 02:05:03 -04:00
Jan Edmund Lazo 8367340b05 build(vim-patch): N/A runtime files (#38666)
* fix(vim-patch): runtime/doc/print.txt is N/A

- https://github.com/neovim/neovim/issues/21471

* fix(vim-patch): test_urls.vim is N/A

- https://github.com/neovim/neovim/pull/35593
2026-04-01 04:25:43 +00:00
Justin M. Keyes 844f2d2e13 ci(lintcommit): allow "NVIM vx.y.z" commit message #38563 2026-03-29 18:59:42 -04:00
Jan Edmund Lazo 83f0dd638c vim-patch:9.1.0327,9.2.0019 (#38567)
* vim-patch:9.2.0019: Hard to configure Vim according to full XDG spec

Problem:  Hard to configure Vim according to full XDG spec
Solution: Include the $VIMRUNTIME/xdg.vim script as an example.
          (Andrey Butirsky).

closes: vim/vim#19421

----

Nvim already supports XDG spec and provides 'stdpath()'.
runtime/xdg.vim is N/A.

----

https://github.com/vim/vim/commit/4f04efb760af4f51975091ace7605c3dbd01d0c9

* vim-patch:9.1.0327: No support for using $XDG_CONFIG_HOME

Problem:  No support for using $XDG_CONFIG_HOME
Solution: optionally source $XDG_CONFIG_HOME/vim/vimrc
          (Luca Saccarola)

fixes: vim/vim#2034
closes: vim/vim#14182

---

test_xdg.vim can be applicable but it's a chore to swap "vimrc" with
"init.vim" and comment out gvimrc in all tests.
Nvim has enough XDG functional tests and runtime documentation.

Vim eventually rewrites the screendump tests such that
Nvim can run them in Unix-like systems.
It's possible to just port the latest version
and treat the older patches as N/A.

---

https://github.com/vim/vim/commit/c9df1fb35a1866901c32df37dd39c8b39dbdb64a
2026-03-30 06:56:22 +08:00
Justin M. Keyes d995142dbd fix(scripts): collect_typos.lua: show commit message on failure 2026-02-12 13:46:53 +01:00
Jan Edmund Lazo d93e150888 fix(vim-patch): add N/A files and re-sort (#37544)
Nvim doesn't maintain runtime/macros/README.txt.
Nvim has existing linting rules for preprocesor.
2026-01-25 10:18:14 +08:00
Jan Edmund Lazo 4cce77e547 vim-patch:9.1.1984: terminal OSC52 support can be improved (#37543)
Problem:  terminal OSC52 support to access the clipboard can be improved
Solution: Include and package the optional osc52 package, note: this
          requires a Vim with clipboard provider feature (Foxe Chen).

related: vim/vim#14995
closes: vim/vim#18575

https://github.com/vim/vim/commit/02b8ec7da52bb11e49d3e0d801eb0d349c73677e

----

Nvim has incompatible implementation for OSC52 clipboard provider.
Vim9 is N/A.

Co-authored-by: Foxe Chen <chen.foxe@gmail.com>
2026-01-25 08:17:33 +08:00
Jan Edmund Lazo 5042394241 vim-patch:9.1.0697: [security]: heap-buffer-overflow in ins_typebuf (#37372)
Problem:  heap-buffer-overflow in ins_typebuf
          (SuyueGuo)
Solution: When flushing the typeahead buffer, validate that there
          is enough space left

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4ghr-c62x-cqfh

https://github.com/vim/vim/commit/322ba9108612bead5eb7731ccb66763dec69ef1b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 13:35:21 +08:00
Jan Edmund Lazo 025c0c34ce build(vim-patch): Vim9 comment plugin is N/A (#37370)
Nvim has builtin 'gc' commenting, instead of bundling
https://github.com/tpope/vim-commentary, partly for treesitter.
Vim9 comment plugin, runtime/pack/dist/opt/comment/ seems to be based on
https://github.com/habamax/.vim/blob/master/autoload/comment.vim
which is similar to vim-commentary.

test/functional/lua/comment_spec.lua has enough tests to justify
skipping test_plugin_comment.vim.
Vim's terminal + packadd + Vim9 test files is a chore to manually port.

- https://github.com/neovim/neovim/commit/73de98256cf3932dca156fbfd0c82c1cc10d487e
- https://github.com/vim/vim/pull/14634
2026-01-12 07:03:25 +00:00
zeertzjq 7a6e8d4430 docs: misc (#37281)
Close #37289
Close #37348

Co-authored-by: Marc Jakobi <marc@jakobi.dev>
Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 03:50:57 +00:00
zeertzjq d1f7672bc9 vim-patch:fc00006: runtime(sieve): preserve existing line endings in ftplugin (#37334)
Only set fileformat=dos for new files; preserve existing line endings
when editing. This satisfies RFC 5228 for new files while avoiding
issues with version control and existing workflows.

The previous change (3cb4148) unconditionally set fileformat=dos, which
converts existing files with LF line endings to CRLF on save. This
causes issues with version control (entire file appears changed) and
breaks workflows where sieve files are stored with unix line endings.

Dovecot Pigeonhole (the main sieve implementation) has explicitly
accepted LF line endings since 2008 (commit 97b967b5):
  /* Loose LF is allowed (non-standard) and converted to CRLF */
This behavior has remained unchanged for almost 18 years.

closes: vim/vim#19144

https://github.com/vim/vim/commit/fc00006777594f969ba8fcff676e6ca1bcb43546

Co-authored-by: André-Patrick Bubel <code@apb.name>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:07:58 +08:00
Jan Edmund Lazo 8bd942e820 build(vim-patch): getscript plugin is N/A (#37247)
- https://github.com/neovim/neovim/issues/2231#issuecomment-89873348
- https://github.com/neovim/neovim/pull/3826
2026-01-05 13:33:57 +08:00
Jan Edmund Lazo d548b52b0f build(vim-patch): update Vim N/A file/regexp (#37049)
* fix(vim-patch): test_codestyle.vim is NA

Neovim has make lint, specifically clint.lua.
Unless vim9jit, https://github.com/tjdevries/vim9jit, or similar tool
compiles vim9 "test" code into lua, it's futile to port it.

* fix(vim-patch): NA files from dev_vimpatch.txt

- channel
- json
- job
- term
- terminal

Nvim has its own incompatible implementation or uses 3rd-party
libraries (ie. libuv, libtermkey).

* fix(vim-patch): term.c is applicable for replace_termcodes()

* fix(vim-patch/na): blowfish,dlldata,iid_ole,nbdebug,os_w32

blowfish is for encryption.
dlldata,iid_ole,os_w32 are for Windows (GUI, registry, entry point).
Nvim doesn't need them to be installed on Windows.

nbdebug.[ch] is for Netbeans Debugging Tools.
They're N/A.

* fix(vim-patch): runtime/

Nvim has its own documentation for development

- runtime/doc/debug.txt
- runtime/doc/develop.txt

N/A since the beginning:

- runtime/doc/os_haiku.txt
- runtime/doc/pi_logipat.txt
- runtime/doc/quotes.txt
- runtime/plugin/logiPat.vim
- runtime/plugin/manpager.vim
- runtime/tools/demoserver.py
- runtime/spell/.*\.latin1

Vim9 is N/A.

- runtime/doc/os_haiku.txt

* fix(vim-patch): src/

win32yank replaces "src/winclip.c".
Vim's desktop files are N/A.
Nvim removed 'termencoding'.
Nvim doesn't use Vim's lsan-suppress.txt to configures LSAN.
2026-01-04 14:15:23 +08:00
Jan Edmund Lazo 5196162540 feat(version): support multiple Vim versions
Group up to 15 vimpatch numbers in 1 line to guard against
'make formatc'.
1-liner for vim_versions, num_patches.

Automate '*Version' to remove version.h macros.

'-V1 -v' lists merged Vim versions.
2025-12-01 02:34:51 -05:00
Jan Edmund Lazo 361671870e feat(vim-patch.sh): -M lists all ported patches
Start from current "v:version".
Exclude reverted patches.
Normalize left-zero-pad patch numbers to avoid grep inverse pattern
file like scripts/vim_na_regexp.txt.
Track reverted patches in vimpatch_token_reverts.txt
because no convention in git-log.

TODO: Track patch numbers per v:version in version.c.
2025-12-01 02:34:51 -05:00
Justin M. Keyes d62bbe24cb fix(tui): enable vtpcon strikethrough feature #36762
Problem:
Strikethrough was not enabled for vtpcon thus preventing strikethrough
text from being shown.

Solution:
Update `windows.ti`.

Co-authored-by: ymich9963 <gmichael834@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-11-30 11:22:12 -05:00
Siwen Yu 4daa8eb5ab fix(appimage): wrong $ARCH used by linuxdeploy #36712
Problem:
In scripts/genappimage.sh running on arm64 host, the $ARCH will be set to
'arm64' before calling linuxdeploy, which cause linuxdeploy to generate
an 32bit ELF executable instead 64bit. See the issue for more details.

Solution:
Keep $ARCH unchanged, use $ARCH_OUTPUT in the output file name. On arm64
host, $ARCH_OUTPUT will be converted to 'arm64'.
2025-11-27 09:33:12 -08:00
Justin M. Keyes b7a670a6d2 docs: decode MIME-encoded author name 2025-11-23 20:03:12 -05:00
Yochem van Rosmalen a468bc573d ci: check URL reachability #35593
Problem:
scripts/check_urls.vim manually matches urls in the help pages and then
synchronously checks them via curl/wget/powershell. This is extremely
slow (~5 minutes for Nvims runtime on my machine) and prone to errors in
how the urls are matched.

Solution:
- Use Tree-sitter to find the urls in the help pages and `vim.net.request` to
  check the responses.
- Add a `lintdocurls` build task and check it in CI (every Friday).
  - Reopens a dedicated issue if it finds unreachable URLs.
- Drop the old check_urls.vim script.
2025-11-18 12:35:22 -08:00
Jan Edmund Lazo d2517acdc5 fix(vim-patch.sh): 'vim-patch:<hash>' token for 'non-patch' commits #36534
Vim may tag runtime-only commits without the 2-liner version.c change.
Inspect both tag and commit message to "guess" if it the patch
should go to version.c or not.
2025-11-12 20:46:22 -08:00
zeertzjq 8bce9342d1 fix(vim-patch.sh): don't treat 1-file runtime-only patch as N/A (#36525)
If the patch in question does not change src/version.c, `git log -1`
instead shows the previous patch that changes src/version.c, which
causes 1-file runtime-only patches to be considered N/A.

Check that the remaining file is src/version.c to fix this problem.
Also use `git diff-tree` instead of `git log -1` for version.c.
2025-11-12 14:45:20 +08:00
Jan Edmund Lazo 7fe02126f9 feat(vim-patch.sh): add n flag to list possible N/A patches (#36431)
Scan all unmerged Vim commits to determine which commits are N/A
for Neovim.
vim_na_regexp.txt contains the file patterns to filter out N/A files
in a Vim commit.
vim_na_files.txt contains "absolute filepath" of N/A files.
It relies on vim_na_regexp.txt to reduce file size.
If version.c remains and it has the expected 2-liner update,
then it's considered N/A.

https://github.com/neovim/neovim/discussions/36326
2025-11-11 03:09:44 +00:00
Justin M. Keyes 130ef73e39 fix(scripts): release.sh 2025-11-02 11:57:56 -05:00
Justin M. Keyes 6dd6c5b523 docs: rename l10n help files #36377 2025-10-28 20:15:16 -07:00
bfredl e656d7be2e perf(tui): faster implementation of terminfo
The processing of terminfo can be separated into two steps:

1. The initialization of terminfo, which includes trying to find $TERM
   in a terminfo database file. As a fallback, common terminfo
   definitions are compiled in. After this, we apply a lot of ad-hoc
   patching to cover over limitations of terminfo.

2. While processing updates from nvim, actually using terminfo strings
   and formatting them with runtime values. for this part, terminfo
   essentially is a hyper-enhanced version of snprintf(), including
   a sm0l stack based virtual machine which can manipulate the runtime
   parameters.

This PR completely replaces libuniblium for step 2, with code
vendored from NetBSD's libtermkey which has been adapted to use typesafe
input parameters and to write into an output buffer in place.

The most immedatiate effects is a performance enhancement of
update_attrs() which is a very hot function when profiling the
TUI-process part of screen updates. In a stupid microbenchmark
(essentially calling nvim__screenshot over and over in a loop) this
leads to a speedup of ca 1.5x for redrawing the screen on the TUI-side.
What this means in practise when using nvim as a text editor is probably
no noticible effect at all, and when reabusing nvim as idk a full screen
RGB ASCII art rendrer maybe an increase from 72 to 75 FPS LMAO.

As nice side-effect, reduce the usage of unibilium to initialization only..
which will make it easier to remove, replace or make unibilium optional,
adressing #31989. Specifically, the builtin fallback doesn't use
unibilium at all, so a unibilium-free build is in principle possible
if the builtin definitions are good enough.

As a caveat, this PR doesn't touch libtermkey at all, which still has a
conditional dependency on unibilium. This will be investigated in a
follow-up PR

Note: the check of $TERMCOLOR was moved from tui/tui.c to
_defaults.lua in d7651b27d5 as we want to
skip the logic in _defaults.lua if the env var was set, but there
is no harm in TUI getting the right value when the TUI is trying to
initialize its terminfo shenanigans. Also this check is needed when
a TUI connects to a `--headless` server later, which will observe
a different $TERMCOLOR value than the nvim core process itself.
2025-10-18 11:36:16 +02:00
Jan Edmund Lazo f211af3ab7 vim-patch:8.2.3962: build fails for missing error message
Problem:    Build fails for missing error message.
Solution:   Add changes in missed file.

https://github.com/vim/vim/commit/d0819d11ecdf3bca4b0800ef905091b5e175b6f4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-10-12 23:33:20 -04:00
Jan Edmund Lazo ed0f46af62 vim-patch:8.1.1978: the eval.c file is too big
Problem:    The eval.c file is too big.
Solution:   Move filter() and map() to list.c.

https://github.com/vim/vim/commit/1e1d30048e722906a13665bd6c3c24c87eb2fe25

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-10-06 20:56:38 -04:00
zeertzjq 916ff94649 build(vim-patch.sh): fix new files matching pattern not removed 2025-09-27 18:55:48 +08:00
Eisuke Kawashima 2d8ed73143 build(vim-patch.sh): ignore runtime/*/testdir/
tracked files are removed
2025-09-27 18:55:43 +08:00
zeertzjq fb2d736481 build: add script to collect typo PRs (#35824) 2025-09-18 10:02:53 +08:00
Justin M. Keyes 9c3099f0cf docs: lsp, misc
- Problem: It's not clear for new plugin developers that `:help` uses
  a help-tags file for searching the docs, generated by `:helptags`.
  - Solution: Hint to the |:helptags| docs for regenerating the tags
    file for their freshly written documentation.

Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
2025-09-03 23:03:51 -04:00
zeertzjq 35be59cc7b vim-patch:9.1.1626: cindent: does not handle compound literals (#35319)
Problem:  C-indent does not handle compound literals
          (@44100hertz, @Jorenar)
Solution: Detect and handle compound literal and structure
          initialization (Anttoni Erkkilä)

match '=' or "return" optionally followed by &, (typecast), {
Fixes also initialization which begins with multiple opening braces.

fixes: vim/vim#2090
fixes: vim/vim#12491
closes: vim/vim#17865

https://github.com/vim/vim/commit/5ba6e41d37ec29fc8360a4f06d4e95c63eb013ab

Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
2025-08-12 23:21:09 +00:00
Justin M. Keyes 56a4ef3c21 docs: lsp, ui events, dev guidance, osc7
fix #34981
2025-07-28 22:00:25 -04:00
Yochem van Rosmalen 35af766de6 refactor(lua): use vim.system #34707 2025-07-23 20:03:30 -07:00
zeertzjq 1c6ddd9a5f build(vim-patch.sh): remove vim.pot (#34964)
This file is updated on almost every source change like version.c.
2025-07-17 09:27:41 +08:00
Phạm Bình An 9d5eb3eda5 docs: rename builtin.txt, eval.txt #34212
Problem:
Despite the name, `builtin.txt` only includes Vimscript functions, which
is confusing, especially to people who only use Lua to configure Nvim

Solution: From justinmk's suggestion
- Rename `builtin.txt` to `vimfn.txt`
- Rename `eval.txt` to `vimeval.txt`
- The tags `*builtin.txt*` and `*eval.txt*` should be kept for Vim-patches

Closes #33743
2025-05-30 08:57:58 -07:00