Commit Graph

998 Commits

Author SHA1 Message Date
phanium
a99d0c6810 build: support variant builds via env-var and cpack overrides #40947
Problem: scripts/genappimage.sh runs `make` with no extra flags and
emits a fixed nvim-linux-<arch>.appimage filename, so packaging a
variant build (e.g. with the bundled PUC-Rio Lua interpreter)
requires editing the Makefile or post-renaming the AppImage, which
breaks the AppImage zsync URL.

Solution: forward DEPS_CMAKE_FLAGS and CMAKE_EXTRA_FLAGS to `make`,
accept OUTPUT so the AppImage (and its zsync Filename:) follows the
caller's chosen name, and mark CPACK_PACKAGE_FILE_NAME as CACHE
STRING on Linux so the resulting tarball/deb follow as well. Default
behavior is unchanged when none of these env vars are set.
2026-07-24 13:55:36 -04:00
Jan Edmund Lazo
3d5d2ad4a9 fix(vim-patch.sh): omit gpg for git-log #37173
"vim-patch.sh -L" includes gpg signature for "log.showSignature=true"
in user's .gitconfig.
vim-patch.sh expects no signature for 1-line output per patch.
2026-07-24 08:37:47 -04:00
Justin M. Keyes
9604c758b3 perf(options): no-alloc keysets 2026-07-24 13:05:20 +02:00
Justin M. Keyes
f8cfd7f06a feat(options): schema, "dict" options, messages
Problem:
Options parsing is still painful for dict-style options.

Solution:
schema-maxxing => better `opt:get()` (will be the basis for `vim.o()`),
unified (and more-detailed) err msgs.

- Drop bespoke structure-builder in `_core/options.lua`.
- Define `schema` for all non-primitive options (except 'guicursor' and
  statusline-style options); generate reified keysets `OptKeyDict`).
  - Generate 'fillchars' => `fcs_tab`, 'listchars' => `lcs_tab`.
- `nvim_set_option_value`:
  - Return the improved structures. Also from `vim.opt.x:get()`.
  - Eliminate api <=> lua roundtrip, centralize option structure
    handling.
- Improve/unify errors.
  - Bump ERR_BUFLEN 80 → 256 so the "one of" list isn't truncated.
- Eliminate old 'diffopt' order-dependence (`iwhiteall` before `iwhite`)

Error samples:

    Typed-key path (opt_strings_check → diffopt/mousescroll/breakindentopt):
    E474: Unknown item 'foo'
    E474: 'context' requires a number
    E474: 'ver' number is out of range
    E474: 'algorithm' must be one of: myers, minimal, patience, histogram
    E474: 'filler' does not take a value

Related:

- #31084
- #34661
- #31820
- #14739
- #20107
- fix #18875
  - :get() returns `{ sbr = true, shift = '3' }` (reified-keyset) instead of `{'sbr', 'shift:3'}`
  - Setting via table now works too. `object_as_optval_for` `is_map` now recognizes struct options.
- fix #30296
  - instead of `E474: Invalid argument`, errors now look like:
    ```
    E474: Invalid value 'x', expected one of: single, double: ambiwidth=x
    E474: Unknown item 'foo': diffopt=foo
    E474: 'context' requires a number: diffopt=context:x
    ```

simplify `win_float_parse_option` from #26799.
2026-07-24 13:05:20 +02:00
Jan Edmund Lazo
cabfa17480 build(vim-patch): logfile.c is N/A
Vim channel API logging is N/A.
2026-07-23 08:56:22 -04:00
Jan Edmund Lazo
8edbf9dac0 build(vim-patch): n/a doc for channel,job api
Vim's code and test for channel,job API are already N/A.
Blacklisting runtime/doc/channel.txt ensures most patches for it
will be detected as N/A.
Vim's API that is too incompatible with Neovim must be handled
outside vim-patch.sh .
2026-07-23 08:56:22 -04:00
Jan Edmund Lazo
800e12ac8a build(vim-patch): n/a runtime/doc/*.txt updates
- Vim version header (date)
- N/A Vimscript functions
    - "listener_" and "redraw_listener_" API
- N/A line changes
    - "^.*{.* compiled with .*}$"
2026-07-23 08:56:22 -04:00
Barrett Ruth
1dffa35d46 build(deps): bundle tree-sitter-diff parser #40778 2026-07-19 19:55:20 -04:00
Jan Edmund Lazo
d2a3e0e881 vim-patch:8.2.2271: ml_get error when changing hidden buffer in Python (#40833)
Problem:    ml_get error when changing hidden buffer in Python.
Solution:   Block updating folds. (closes vim/vim#7598)

----

"ctx_switch()", "ctx_restore()" obsolete "switch_buffer()" and
"restore_buffer()".
Latter are unused since https://github.com/neovim/neovim/pull/15831.
Mark them as N/A (until some test fails).

----

3e0107ea16

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-07-19 19:51:47 -04:00
Jan Edmund Lazo
ad3720b882 vim-patch:8.2.1968: Vim9: has() assumes a feature does not change dynamically (#40827)
Problem:    Vim9: has() assumes a feature does not change dynamically.
Solution:   Check whether a feature may change dynamically. (closes vim/vim#7265)

----

"dynamic_feature()" is only for vim9script which is N/A.

----

8cebd43e97

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-07-19 02:33:25 +00:00
Jan Edmund Lazo
9536d35099 build(vim-patch): ignore amount of whitespace change
Patch 9.1.1363 is N/A after ignoring whitespace.

-----

Unrelated N/A patches
vim-patch:8.1.1985: code for dealing with paths is spread out

https://github.com/neovim/neovim/pull/36125#issuecomment-5012670153
2026-07-18 16:09:17 -04:00
Jan Edmund Lazo
277cb1b431 build(vim-patch): "vim_" char/string N/A funcs
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.

Neovim refactored Vim's "char/string" functions to be either safer
(ie. xstrlcat) or target Unicode.
2026-07-18 15:10:03 -04:00
Jan Edmund Lazo
a99f8989f7 build(vim-patch): alloc.c N/A functions
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
I use the 'vim_na_*' files to debug the filtered diff of files
that seem N/A but contain relevant code.
I can't blacklist the entire file.
2026-07-18 14:49:33 -04:00
Jan Edmund Lazo
0d92bf3761 build(vim-patch): '#ifdef FEAT_' tweaking is N/A #40785
Filter out `#ifdef` line changes when analyzing C files (*.c, *.h)
via git "-I" flag.

```
-I<regex>
--ignore-matching-lines=<regex>
Ignore changes whose all lines match <regex>. This option may be specified more than once.
```

- https://git-scm.com/docs/diff-options#Documentation/diff-options.txt--Iregex
2026-07-17 07:16:31 -04:00
Jan Edmund Lazo
02290ba155 build(vim-patch): detect patch v8.2.0000 as N/A
Following features must be N/A to detect v8.Y.0000 as N/A

- VisVim
- Windows *.def files
- Gvim
- runtime/doc/version8.txt ("too old")
  (https://github.com/neovim/neovim/pull/1116 deletes version7.txt)
2026-07-14 01:34:44 -04:00
Jan Edmund Lazo
2e9b06caf7 build(vim-patch): N/A runtime/doc/*.txt changes
Vim's runtime/doc/*.txt may change the 1st line only
for publish datetime.
Nvim removed those datetimes.

TODO - src/version.h for vX.Y.0000 patch.
2026-07-14 01:03:57 -04:00
Jan Edmund Lazo
60cbdc7996 build(vim-patch): src/version.h is N/A #40730
PR https://github.com/neovim/neovim/pull/36585 enabled
"scripts/vim-patch.sh", "scripts/vimpatch.lua" to optimize out
(all?) macros from Vim's "src/version.h".
If it does have relevant updates, then the applicable files
(ie. src/version.c) will use them to make the patch applicable.

Goal - Detect N/A patches for Vim release vX.Y.0000.
2026-07-13 21:26:08 -04:00
Justin M. Keyes
17f13ab338 Merge #40473 from janlazo/vimpatch_na_cfuncs
build(vim-patch): detect N/A C files based on diff
2026-07-12 12:13:20 -04:00
Justin M. Keyes
81c4c295ac refactor(insert): rename edit.c => insert.c #40705
Problem:
- `edit.c` is an unnecessarily misleading and less-discoverable name
  than `insert.c`.
- Numerous insert-mode related things are named with a `ins_` prefix.
- There is already a `insexpand.c` module...

Solution:
Rename `edit.c` => `insert.c`.
2026-07-12 11:57:17 -04:00
Justin M. Keyes
d25ae8b8c2 refactor(input): rename getchar.c => input.c #40698
Problem:
`getchar.c` is a quirky name and doesn't align with our existing
`os/input.c` and `tui/input.c` modules, which encompass the same topic
at different layers.

Solution:
Rename `getchar.c` => `input.c` for discoverability.

Introduce `dialog.c` for functionality related to showing confirm
prompts, dialogs, etc.
2026-07-12 08:34:13 -04:00
Jan Edmund Lazo
4713f0e9eb build(vim-patch): N/A option callbacks
':h vim-diff' lists N/A options.
Vim triggers callbacks when updating some of these options
(ie. compatible).
These callbacks are N/A.
2026-07-06 14:23:54 -04:00
Jan Edmund Lazo
e618d279b8 build(vim-patch): version.c "included_patches[]" is N/A
Nvim relies on commit history for automated updates
to ported Vim patches across Vim releases via "included_patchsets[]".
Each Vim commit is suppose to manually adjust "included_patches[]"
but it is prone to human error such that vim-patch.sh found
the following N/A commits:

```
495282b6e Correct list of patch numbers
85d9b03f8 Correct list of patches.
```

Prior to this commit, vim-patch doesn't find the following N/A commit:

```
9.0.2172: Vim9: compiling :defer may fail
```

https://github.com/neovim/neovim/pull/40519#issuecomment-4850337525
2026-07-06 09:51:27 -04:00
Jan Edmund Lazo
384a9c451a build(vim-patch): detect N/A C files based on diff
vim_na_cfuncs.txt lists Vim C functions that are N/A to Nvim.
Listed in 'src/proto/*.proto' files.
Based on ':h vim-diff'.

- features (ie. balloon, tabpanel)
- Ex-commands
- eval functions (ie. f_err_teapot())

On top of the existing algorithm,
scan diff hunks on C files to filter out N/A C functions.
If the remaining hunk contains applicable changes,
then the patch is applicable.
If the patch does not modify C files, then it is likely applicable.
2026-07-06 09:51:27 -04:00
Jan Edmund Lazo
3255e0546f build(vim-patch): mark 'tabpanel' files as N/A #40538
https://github.com/neovim/neovim/issues/34273 was not reopened.
Unsure if this feature warrants C code based on current codebase
and ecosystem. Nvim avoided CVE because it hasn't ported this feature
both "autocmd_add()".

N/A C functions outside these files will be marked N/A if
https://github.com/neovim/neovim/pull/40473 is merged.
2026-07-02 06:56:23 -04:00
Jan Edmund Lazo
bb6576c92a build(vim-patch): add N/A src/ files #40468
socketserver.c is not compatible with Neovim's server implementation.

cairo, kitty, sixel, and similar backends for image rendering in popup
are not required in Neovim's C core.
Neovim can do this and even run Doom.
See patch 9.2.0612.
2026-06-28 19:00:43 -04:00
Ryan Patterson
08b47b1964 test: wasm tree-sitter #40304
Problem:
No CI coverage for wasm builds.

Solution:
Add a basic workflow that builds with ENABLE_WASMTIME
and runs wasm-specific tests.
2026-06-19 05:51:30 -04:00
Justin M. Keyes
4c3b0ecb46 fix(cliff): strip "backport:" prefix from commit subject #40243
Problem:
Backport commits may have subjects like "backport: fix(ui): ...".
(e.g. ecda67662f). git-cliff treats them as OTHER.

Solution:
Preprocess the subject to strip a leading "backport:" or "backport ".
2026-06-14 12:00:37 -04:00
Jan Edmund Lazo
9708f9ddfb build(vim-patch): test_mswin_event() is N/A (#40158)
Relies on keycode/event handling specific to Windows instead of
"standard (test) API" for all OS.
2026-06-10 01:27:28 +00:00
Jan Edmund Lazo
91d6b046f7 build(vim-patch): N/A test files #40045
- keycode_check.json
- test_alot_latin.vim
- test_expand_dllpath.vim
2026-05-29 06:04:28 -04:00
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)

100118c73a

----

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)

46cd43bda1

----

"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)

6b0e528368

----

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.

----

4f04efb760

* 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.

---

c9df1fb35a
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

02b8ec7da5

----

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