Commit Graph

33925 Commits

Author SHA1 Message Date
zeertzjq
0763a85f43 vim-patch:9.1.1771: complete: some redraw issues with 'autocomplete'
Problem:  complete: some redraw issues with 'autocomplete'
Solution: Fix the issues (Girish Palya)

This commit contains the following changes:
* Fix that wildtrigger() might leave opened popupmenu around vim/vim#18298
* Remove blinking message on the command line when a menu item from a loaded
  buffer is selected during 'autocomplete'
* Add a test for PR vim/vim#18265 to demonstrate why the PR is required for correct
  'autocomplete' behavior

fixes: vim/vim#18298
closes: vim/vim#18328

ee9a2f0512

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 09:58:24 +08:00
zeertzjq
dd306bd48a vim-patch:9.1.1621: flicker in popup menu during cmdline autocompletion
Problem:  When the popup menu (PUM) occupies more than half the screen
          height, it flickers whenever a character is typed or erased.
          This happens because the PUM is cleared and the screen is
          redrawn before a new PUM is rendered. The extra redraw between
          menu updates causes visible flicker.
Solution: A complete, non-hacky fix would require removing the
          CmdlineChanged event from the loop and letting autocompletion
          manage the process end-to-end. This is because screen redraws
          after any cmdline change are necessary for other features to
          work.
          This change modifies wildtrigger() so that the next typed
          character defers the screen update instead of redrawing
          immediately. This removes the intermediate redraw, eliminating
          flicker and making cmdline autocompletion feel smooth
          (Girish Palya).

Trade-offs:
This behavior change in wildtrigger() is tailored specifically for
:h cmdline-autocompletion. wildtrigger() now has no general-purpose use
outside this scenario.

closes: vim/vim#17932

da9c966893

Use pum_check_clear() instead of update_screen().
Cherry-pick Test_wildtrigger_update_screen() change from patch 9.1.1682.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 09:58:24 +08:00
zeertzjq
c2c33249a7 Merge pull request #35832 from zeertzjq/vim-1e7a288
vim-patch: Autoconf M4 syntax updates
2025-09-19 08:20:10 +08:00
zeertzjq
67910bc99f vim-patch:e8b0e92: runtime(config): fix inconsistent group name
related: vim/vim#18292

e8b0e926d0
2025-09-19 07:42:45 +08:00
zeertzjq
f5e6c73e60 vim-patch:1e7a288: runtime(config): mark unportable += as an error
closes: vim/vim#18292

1e7a288cd3

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-19 07:42:44 +08:00
zeertzjq
c9f6267402 vim-patch:9.1.1773: Crash in BufLeave after BufUnload closes other windows (#35830)
Problem:  Crash in BufLeave/WinLeave/TabLeave when closing window after
          BufUnload closes all other windows in the tab page.
Solution: Avoid duplicate BufLeave/WinLeave events. Trigger TabLeave
          before removing the buffer (zeertzjq).

related: vim/vim#14166
related: neovim/neovim#33603
closes: vim/vim#18330

0c70820015
2025-09-19 07:40:12 +08:00
zeertzjq
ec3dded6dd vim-patch:6701480: runtime(filetype): Use s:StarSetf for all patterns ending in * (#35825)
Problem:  Some filetype autocmds with patterns ending in * do not skip
          filenames matching g:ignored_patterns.
Solution: Move these autocmds to the appropriate section and call
          s:StarSetf() to set the filetype.

- Affected filetypes: dosini, execline, foam, messages, nginx, tmux.
- Convert foam filetype patterns to use wildcard matching.

closes: vim/vim#17422

6701480c43

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-19 06:55:00 +08:00
zeertzjq
fb2d736481 build: add script to collect typo PRs (#35824) 2025-09-18 10:02:53 +08:00
zeertzjq
e732ed5668 Merge pull request #35823 from zeertzjq/vim-9.1.1550
vim-patch:9.1.{1550,1761}
2025-09-18 10:01:19 +08:00
zeertzjq
61d7d983d6 vim-patch:9.1.1761: 'ruler' is set in defaults.vim
Problem:  'ruler' is set in defaults.vim, but not enabled by default in
          non-compatible mode.
Solution: set the ruler option in non-compatible mode, remove it from
          defaults.vim, update tests

closes: vim/vim#18260

ba36510920

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-18 08:12:44 +08:00
zeertzjq
8964ad45da vim-patch:9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix
Problem:  defaults: 'showcmd' is not enabled in non-compatible mode on
          Unix
Solution: Always enable 'showcmd' in non-compatible mode, drop it from
          defaults.vim.

'showcmd' was already always enabled in Vim compatible mode except for
UNIX environments. So let's just enable it always, there is no good
reason why UNIX platforms should be handled differently than other
platforms, especially since `defaults.vim` did enable this option
anyhow.

closes: vim/vim#17739

3f9d2378bd

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-18 08:12:31 +08:00
zeertzjq
3c480fca57 vim-patch:5bf41e7: runtime(netrw): update regex to handle remote archives (#35822)
closes: vim/vim#18318

5bf41e7418

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-18 08:01:33 +08:00
zeertzjq
b5e6f44c08 test(ui/messages2_spec): close unfinished timers at end of test (#35817)
The vim._extui.messages module uses multiple timers that last 2 or 4
seconds. If these timers aren't finished when a test ends, there will
be a 2-second delay on exit with ASAN or TSAN.
2025-09-18 08:01:21 +08:00
skewb1k
5148c1247e docs: lsp, vim_diff #35820 2025-09-17 12:29:34 -07:00
Yochem van Rosmalen
a57c7238f9 refactor(plugins)!: remove shellmenu #35815
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-17 11:03:58 -07:00
Yochem van Rosmalen
0bb74f0fe2 docs: standard-plugin-list #35796
The following plugins are intentionally left out:

• osc52.lua: not user-facing
• rplugin.vim: will be removed
• shellmenu: will probably be removed
2025-09-17 09:09:49 -07:00
Tomasz N
e69b81ad94 fix(lsp): treat 2-triggers-at-once as "last char wins" #35435
Problem:
If there are 2 language servers with different trigger chars (`-` and
`>`), and a keymap inputs both simultaneously (`->`), then `>` doesn't
trigger. We get completion items from server1 only.

This happens because the `completion_timer` for the `-` trigger is still
pending.

Solution:
If the next character arrived enough quickly (< 25 ms), replace the
existing deferred autotrigger with a new one that matches this later
character.
2025-09-17 09:07:45 -07:00
zeertzjq
63ece2b151 fix(swapfile): don't use uninitialized memory (#35813)
Also add a test for #35802.
2025-09-17 11:36:27 +08:00
zeertzjq
8ec562fe52 vim-patch:684edc7: runtime(doc): mention generic log highlighter (#35812)
684edc7dce

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-17 10:13:59 +08:00
zeertzjq
da66c34a4f vim-patch:0b7d094: runtime(doc): Tweak doc style in syntax.txt (#35810)
closes: vim/vim#18310

0b7d094d70

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-17 10:13:43 +08:00
zeertzjq
518c1242d4 Merge pull request #35809 from zeertzjq/vim-9.1.1763
vim-patch: kitty config files are not recognized
2025-09-17 10:04:37 +08:00
zeertzjq
8bc89f46b7 vim-patch:115b533: runtime(kitty): Fix typo in syntax file for kitty
closes: vim/vim#18312

115b5338da

Co-authored-by: Shawon <mdmoinulhossainshawon@gmail.com>
2025-09-17 09:08:27 +08:00
zeertzjq
72616693bd vim-patch:b2113e5: runtime(kitty): fix typo in syntax script
related: vim/vim#18280

b2113e511f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-17 09:08:27 +08:00
zeertzjq
114336ac1d vim-patch:9.1.1763: filetype: kitty config files are not recognized
Problem:  filetype: kitty config files are not recognized
Solution: Detect */kitty/*.conf as kitty filetype, include a syntax
          script (Shawon).

closes: vim/vim#18280

a946ccf5ff

Co-authored-by: Shawon <mdmoinulhossainshawon@gmail.com>
2025-09-17 09:08:27 +08:00
zeertzjq
4ef5624729 fix(lsp): restore Client:stop() force-stopping behavior (#35800)
This fixes a regression from #33796.

I tried for several hours and cannot write a working test for this, but
this does fix the following warning in tests run with ASAN or TSAN:

    -------- Running tests from test/functional/plugin/lsp_spec.lua
    RUN      T4667 LSP server_name specified start_client(), stop_client(): 114.00 ms OK
    RUN      T4668 LSP server_name specified stop_client() also works on client objects: 97.00 ms OK
    RUN      T4669 LSP server_name specified does not reuse an already-stopping client #33616: 31.00 ms OK
    nvim took 2022 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!
2025-09-16 20:56:09 -04:00
zeertzjq
8d5476691c test(lsp): make async format test work properly (#35794)
Overriding vim.lsp.handlers['textDocument/formatting'] doesn't work here
because fake_lsp_server_setup() uses a table with __index to specify
client handlers, which takes priority over vim.lsp.handlers[], and as a
result the overridden handler is never called, and the test ends before
the vim.wait() even finishes.

Instead, set a global variable from the handler that is actually reached
(by vim.rpcrequest() from client handler), and avoid stopping the event
loop too early.
2025-09-17 08:21:11 +08:00
luukvbaal
cbfa7f0d7b fix(swapfile): handle newlines in swapfile list message #35802 2025-09-16 11:28:34 -07:00
Christian Clason
8c4f0e5331 build(deps): bump tree-sitter-markdown to v0.5.1 2025-09-16 20:28:00 +02:00
zeertzjq
1460f01faf Merge pull request #35799 from zeertzjq/vim-9.1.1762
vim-patch:9.1.1762,10d1ec6
2025-09-16 22:58:25 +08:00
zeertzjq
f896f07132 vim-patch:10d1ec6: runtime(doc): fix doc style from commit 5c9b71d63c1
related: vim/vim#18265

10d1ec658c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-16 20:58:27 +08:00
zeertzjq
051b8b88c8 vim-patch:9.1.1762: completion: selected item not cleared on <BS> with 'ac'
Problem:  completion: selected item not cleared on backspace when
          'autocomplete' is set
Solution: Clear the selected item (Girish Palya)

closes: vim/vim#18260

5c9b71d63c

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-16 20:58:27 +08:00
zeertzjq
4f9d47bd90 vim-patch:8801c9d: runtime(m4): Improve parameters highlighting in syntax script (#35798)
closes: vim/vim#18306

8801c9db2e

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-16 20:57:44 +08:00
dependabot[bot]
554005981f ci: bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-16 14:49:53 +02:00
zeertzjq
ff777f9a85 docs: small fixes (#35791)
Close #34938
Close #35030
Close #35233
Close #35259
Close #35290
Close #35433
Close #35541
Close #35766
Close #35792

Co-authored-by: huylg <45591413+huylg@users.noreply.github.com>
Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com>
Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com>
Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com>
Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com>
Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com>
Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com>
Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com>
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2025-09-16 11:41:36 +08:00
zeertzjq
e7ff132708 vim-patch:9.1.1764: filetype: CODEOWNERS file not recognized (#35789)
Problem:  filetype: CODEOWNERS file not recognized
Solution: Detect CODEOWNERS file as codeowners filetype, include a
          syntax and filetype plugin (Jon Parise).

CODEOWNERS files define code ownership rules for GitHub-hosted (and
other) repositories. The syntax is similar to 'gitignore' files but
differs in enough ways to warrant its own filetype.

References:
- https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

closes: vim/vim#18299

817e4d3ee6

Co-authored-by: Jon Parise <jon@indelible.org>
2025-09-16 01:58:34 +00:00
zeertzjq
8605b0b7a9 vim-patch:9.1.{1755,1759} (#35787)
vim-patch:9.1.1755: filetype: generic log files are not recognized

Problem:  filetype: generic log files are not recognized
Solution: Detect *.log files as log filetype, include simple log syntax
          script (Mao-Yining).

closes: vim/vim#18285

b8970b43cd

vim-patch:9.1.1759: filetype: generic log detection is too disturbing

Problem:  filetype: generic log detection is too disturbing
          (after v9.1.1755)
Solution: Revert setting log filetype

48f1d6442d

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-16 01:35:44 +00:00
zeertzjq
cf9be1ea23 vim-patch:d4c2cb4: runtime(doc): Improve doc for cmdline-ranges in cmdline.txt (#35788)
closes: vim/vim#18278

d4c2cb4b27

Co-authored-by: Peter Kenny <github.com@k1w1.cyou>
2025-09-16 09:28:37 +08:00
skewb1k
fde0b487fb fix(lsp): avoid re-enabling document_color on registerCapability (#35774)
Problem: The registerCapability handler re-enables document_color,
making it impossible to disable it in LspAttach.

Solution: Enable it once on initialization and avoid re-enabling
on registerCapability.
2025-09-15 17:50:53 -07:00
zeertzjq
ddcfa8bb4a vim-patch:8e0d374: runtime(doc): Improve the doc for :syn-containedin (#35785)
closes: vim/vim#18290

8e0d374e4d

Co-authored-by: Damien Lejay <damien@lejay.be>
Co-authored-by: h_east <h.east.727@gmail.com>
2025-09-16 07:31:21 +08:00
zeertzjq
1bafba31f6 test(swapfile_preserve_recover_spec): fix flaky test (#35782)
Invoke nvim_get_mode() to ensure that pending input is processed.
2025-09-16 07:30:43 +08:00
Yochem van Rosmalen
47b0a718c3 feat(help): gx opens help tag in web browser #35778
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.
2025-09-15 15:38:49 -07:00
zeertzjq
a5d6932686 fix(paste): don't use :echo immediately before :redraw (#35773)
- If tick == 0 at the last chunk, the first :echo will print an empty
  string, which isn't really helpful, and may cause :redraw to move
  cursor to the message area for 'showmode'.
- If tick > 0 at the last chunk, there'll be another :echo that prints
  an empty string immediately after the :redraw.
2025-09-16 06:06:02 +08:00
Yochem van Rosmalen
566e8c66f9 docs: optionlinks don't need the bars #35777
Problem:
Options links work even without vertical bars around them due to their
single quotes: the bars are unnecessary.

Solution:
Remove them.
2025-09-15 12:36:44 -07:00
bfredl
f1a8bb45ca Merge pull request #35387 from bfredl/zigci
build(ci): run more zig builds on ci
2025-09-15 14:09:10 +02:00
bfredl
0458a1e694 build(ci): bump zig to 0.15.1 and add more platforms
- 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
2025-09-15 12:10:23 +02:00
zeertzjq
2debe2f30a fix(lsp): avoid automatic request after leaving insert mode (#35767)
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!
2025-09-15 14:41:29 +08:00
Justin M. Keyes
8e922c657c build: allow comments in deps.txt #35765
Problem:
It was not obvious where our source for "busted" is.

Solution:
Add a comment to `deps.txt`.
2025-09-14 22:30:10 -07:00
zeertzjq
1264d1156c fix(lua): don't leak timer when vim._watch.watch() fails (#35768)
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!
2025-09-15 11:15:25 +08:00
zeertzjq
e2ab5e1db7 vim-patch:81ca991: runtime(html): guard against an existing b:undo_ftplugin var (#35763)
Filetype plugins should not assume they are the only file to execute on
behalf of a buffer's filetype: other filetypes may use them, and
dotted filetypes may cause multiple to run. When this occurs, they
should _build_ on their respective b:undo_ftplugin settings, not
overwrite each other.

For example, when using a dotted filetype wiki.markdown, the wiki
filetype plugins go first. Then, during the markdown filetype plugins,
the HTML plugin's unconditional assignment to b:undo_ftplugin trashes
any data previously stored there by the wiki filetype.

Follow the pattern elsewhere of assigning or appending conditionally.

closes: vim/vim#18267

81ca9916d2

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2025-09-15 08:27:55 +08:00
zeertzjq
3f1b12c886 vim-patch:c37f25c: runtime(doc): update Markdown syntax documentation and mention Pandoc (#35762)
fixes: vim/vim#18286

c37f25c651

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-09-15 08:16:41 +08:00