Problem: completion: selected item not cleared on backspace when
'autocomplete' is set
Solution: Clear the selected item (Girish Palya)
closes: vim/vim#182605c9b71d63c
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem:
`gx` does not work on tags in help buffers to open the documentation of that tag in the browser.
Solution:
Get the `optionlink`, `taglink` and `tag` TS nodes and set extmark "url" property.
`gx` then discovers the extmark "url" and opens it.
- Bump zig version to 0.15.1 and workaround zig fetch hang (ziglang/zig#24916)
- add mac os zig build (currently without luajit, linker failure)
- Add windows zig build, currently with very limited testing
This also fixes the following warning in tests with ASAN or TSAN:
-------- Running tests from test/functional/plugin/lsp/inline_completion_spec.lua
RUN T4604 vim.lsp.inline_completion enable() requests or abort when entered/left insert mode: 225.00 ms OK
RUN T4605 vim.lsp.inline_completion get() applies the current candidate: 212.00 ms OK
nvim took 2013 milliseconds to exit after last test
This indicates a likely problem with the test even if it passed!
RUN T4606 vim.lsp.inline_completion get() accepts on_accept callback: 212.00 ms OK
RUN T4607 vim.lsp.inline_completion select() selects the next candidate: 220.00 ms OK
-------- 4 tests from test/functional/plugin/lsp/inline_completion_spec.lua (3437.00 ms total)
-------- Running tests from test/functional/plugin/lsp/linked_editing_range_spec.lua
nvim took 2011 milliseconds to exit after last test
This indicates a likely problem with the test even if it passed!
This fixes the following warning in tests with ASAN or TSAN:
-------- Running tests from test/functional/lua/watch_spec.lua
RUN T4253 vim._watch watch() ignores nonexistent paths: 29.00 ms OK
nvim took 2006 milliseconds to exit after last test
This indicates a likely problem with the test even if it passed!
Problem: Diff mode crashes when adding text property in autocommand
(after 9.1.1557).
Solution: Only restore ML_EMPTY memline flag, ignore the others
(zeertzjq).
fixes: vim/vim#18288closes: vim/vim#1829146e22fd2f7
Problem: There is no way to ensure a stable key order when encoding a JSON string,
which can be useful for comparisons and producing cleaner diffs.
Solution: Introduce a `sort_keys` option for `vim.json.encode()`,which
is disabled by default. When enabled, object keys are sorted in
alphabetical order.
Problem:
LSP logs show misleading "cannot start" messages when editing a filetype
NOT listed in the `config.filetypes` field.
[ERROR][2025-09-13 18:55:56] …/runtime//lua/vim/lsp/log.lua:151
"cannot start cssls due to config error: …/runtime//lua/vim/lsp.lua:423:
cmd: expected expected function or table with executable command,
got table: 0x0104701b18. Info: vscode-css-language-server is not executable"
Solution:
- `can_start`: check `config.filetypes` before checking the rest of the
config.
Problem:
Multigrid UIs have to find out which window to send the input by using
the Nvim focus rules, which are not fully documented.
Furthermore,`getmousepos()` has several problems when multigrid is
enabled, with the main one being that screenrow and screencol are window
relative instead of screen relative, due to the fact that the UI don't
send any absolute coordinates.
Solution:
Allow passing 0 as grid to `nvim_input_mouse`, with absolute
coordinates, which lets nvim determine the actual window to send the
mouse input to. This works as long as nvim is in charge of the window
positioning. If the UI repositions or resizes the windows, it can still
pass the grid it determines like before.
Problem: A 'rulerformat' not part of the statusline is not emitted through
msg_ruler events.
Solution: Build the message chunks to emit as a msg_ruler event.
Problem: First clean start with config containing multiple
`vim.pack.add()` calls requires to explicitly confirm each one.
Although usually a rare occurrence, it still might be tedious.
Solution: Add a third choice during installation confirmation that
approves current and all next installs within current session. It is
reset after session restart.
Problem: defaults: 'diffopt' option value can be improved
Solution: Update diffopt defaults to include "indent-heuristic" and
"inline:char" (Yee Cheng Chin)
The default diff options have not been updated much despite new
functionality having been added to Vim.
- indent-heurstic: This has been enabled by default in Git since
33de716387 in 2017. Given that Vim uses xdiff from Git, it makes sense
to track the default configuration from Git.
- inline:char: This turns on character-wise inline highlighting which is
generally much better than the default inline:simple. It has been
implemented since vim/vim#16881 and we have not seen reports of any issues
with it, and it has received good feedbacks.
closes: vim/vim#18255976b365305
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: Using common name in tests leads to flaky tests.
Solution: Rename files and directories to be more specific.
3b0d70f4ff
This includes only test_help.vim changes.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
Crash on startup in some situations due to call to `set_curbuf`
with the current value of `cur_buf`.
Solution:
Switch buffers before doing the wipeout of the stdin buffer.
Use cmdline cmds instead of raw buffer pointers to avoid lifetime issues.
Problem: tests: No test when deleting text after autocompletion with preinsert
did complete an entry
Solution: Verify, that after deletion autocompletion does not reinsert
the deleted text. Note: the actual issue was fixed with v9.1.1750.
(Girish Palya)
Pre v9.1.1750 behaviour:
When autocomplete is enabled with *preinsert*, deleting text after selecting a
longer match could cause unintended reinsertion, e.g.:
- Matches available: "foo" and "foobar".
- User selects "foobar" with Ctrl-N
- User deletes characters back to "foo".
- Autocomplete then incorrectly re-inserts "bar", preventing deletion past "foo".
v9.1.1750 removes the unwanted reinsertion so text can be deleted correctly.
closes: vim/vim#18259fe0061c609
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
(Girish Palya).
When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.
Related to https://github.com/vim/vim/pull/18213.
closes: vim/vim#182542525c56e42
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: completion: redo (.) broken with preinsert and autocompletion
Solution: Make redo (.) work with preinsert and autocompletion
(Girish Palya)
closes: vim/vim#18253306a138172
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: complete: preinsert does not work well with preinsert
Solution: Make "preinsert" completeopt value work with autocompletion
(Girish Palya)
This change extends Insert mode autocompletion so that 'preinsert' also
works when 'autocomplete' is enabled.
Try: `:set ac cot=preinsert`
See `:help 'cot'` for more details.
closes: vim/vim#18213fa6fd41a94
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: nvim_win_set_config may crash when attempting to move curwin to a
different tabpage if there is no other non-float available to switch to.
Solution: fix the crash. Fix ONE_WINDOW checks in winframe_find_altwin and
win_altframe to consider floating windows by instead using one_window. Allow
one_window to consider non-current tabpages. We can use one_window in
win_close_othertab now to also better reflect its use in win_close.
Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Problem: cmdline-autocompletion breaks history navigation (ddad431)
Solution: Support history navigation in cmdline autocompletion (Girish
Palya)
Up/Down arrows support history navigation when using wildtrigger()
fixes: vim/vim#18207closes: vim/vim#18219708ab7f5fb
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem:
Currently, prompt_buffer manages `:` mark by itself and exposes it
read-only mark. However when it fails there can be no mitigation made
by plugins. The `:` mark should act like a regular marks and be
modifiable.
Solution:
Allow plugins to set `:` mark.
The flakiness happens because get() uses vim.schedule(), and a following
key may be processed before the scheduled event. Use poke_eventloop() to
ensure that the scheduled event is processed.
Problem: Matches may be listed twice with wildmode=longest,list when
"longest" doesn't change command line (after 9.1.1737).
Solution: Set did_wild_list when trying "list" after "longest"
(zeertzjq).
closes: vim/vim#18227a28a2eb9d9
Problem: Patch v9.1.1714 introduce a regression for wildmenu (zeertzjq)
Solution: Restore behavior of "longest" in 'wildmode' (Girish Palya)
- Fixed a regression caused by PR vim/vim#18125 selecting wrong item
- Fixed another regression where the first pasted text did not appear on
the command-line after starting Vim.
closes: vim/vim#182128fec92d631
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: completion: long line shown twice
(Maxim Kim)
Solution: Fix the issue, disable an incorrect test.
(Girish Palya)
fixes: vim/vim#18035closes: vim/vim#1808857379302aa
Omit removal of blank line in Test_noselect_expand_env_var() as it's
added again in patch 9.1.1682.
Cherry-pick two blank lines in Test_long_line_noselect() from patch
9.1.1682.
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: Some environment variables which are useful when working inside
a bare repository can affect any Git operation.
Solution: Explicitly unset problematic environment variables.
Problem:
There is no straightforward way to pretty-print objects as JSON.
The existing `vim.inspect` outputs LON.
Solution:
Introduce an `indent` option for `vim.json.encode()` which enables
human-readable output with configurable indentation.
Adapts PR to upstream: openresty/lua-cjson#114
Problem:
Force resolve `spec.version` overrides the information about whether
a user supplied `version` or not. Knowing it might be useful in some use
cases (like comparing to previously set `spec` to detect if it has
changed).
Solution:
Do not resolve `spec.version`. This also improves speed when triggering
events and calling `get()`.
- Place default branch first when listing all branches.
- Use correct terminology in `get_hash` helper.
- Do not return `{ '' }` if there are no tags.
Problem:
There is no way to get more information about installed plugins, like
current revision or default branch (necessary if resolving default
`spec.version` manually). As computing Git data migth take some time,
also allow `get()` to limit output to only necessary set of plugins.
Solution:
- introduce arguments to `get(names, opts)`, which follows other
`vim.pack` functions. Plugin extra info is returned by default and
should be opt-out via `opts.info = false`.
- Examples:
- Get current revision: `get({ 'plug-name' })[1].rev`
- Get default branch: `get({ 'plug_name' })[1].branches[1]`
- `update()` and `del()` act on plugins in the same order their names
are supplied. This is less surprising.
- default `opts.info` to `true` since this simplifies logic for the
common user, while still leaving the door open for a faster `get()` if
needed.
As noted in #34908, the arm unittests fail due to unrecognized types:
ERROR test/unit/testutil.lua @ 802: Expressions parser works with &opt
test/unit/testutil.lua:774: test/unit/testutil.lua:758: (string) '
test/unit/testutil.lua:288: declaration specifier expected near '__SVFloat32_t''
exit code: 256
After testing on Debian's arm64 porterbox, the unittests cleanly pass
when ignoring various types defined in
/usr/include/aarch64-linux-gnu/bits/math-vector.h
Problem: after #34287 nvim_win_set_config no longer errors when attempting to
split from a floating window only if "win" is 0.
Solution: fix the regression, reduce the scope of "parent" and similar checks to
only where it's currently used and add test coverage for the errors.
Problem: Progress reports use plain `nvim_echo()` with manually
constructed messages and populate history on every call.
Solution: Use `nvim_echo()` with newly added `kind=progress` which (at
least for now) is meant to be a unified interface for showing progress
report. Also save in history only first and last progress report
messages.
Problem: filetype: .inc file detection can be improved
Solution: Update filetype detection for Pascal and BitBake code
(Martin Schwan).
Fix the detection of .inc files containing Pascal and BitBake code:
- the concatenated string, merged from three lines, only contains one
beginning and the pattern "^" would not match as expected. Use a range()
loop to iterate each line string individually. This way, the pattern "^"
works for beginning of lines.
- improve BitBake include file detection by also matching forward-slashes
"/" in variable names and assignment operators with a dot ".=" and "=.".
Valid examples, which should match, are:
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
MACHINEOVERRIDES =. "qemuall:"
BBPATH .= ":${LAYERDIR}"
- parse twenty instead of just three lines, to accommodate for potential
comments at the beginning of files
closes: vim/vim#182029fd1a657d2
Co-authored-by: Martin Schwan <m.schwan@phytec.de>
Problem:
Adding multigrid tests to `mouse_spec` requires all tests to test both
the multigrid and non-multigrid screen state, which adds a lot of extra
code.
Solution:
Instead of testing the full screen state, only test substrings of it.