Commit Graph

9929 Commits

Author SHA1 Message Date
zeertzjq
e1aceb0068 vim-patch:e09ff34: runtime(ty): include ty compiler plugin (#37066)
closes: vim/vim#18960

e09ff34129

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-12-22 08:13:20 +08:00
Jaehwang Jung
756e1eb017 fix(treesitter.foldexpr): duplicate callbacks #37048
Problem:
VimEnter clears foldinfo, so register_cbs is called again after
VimEnter. The duplicate parser callbacks break incremental fold
computation.

Solution:
Check if the callbacks are already registered.
2025-12-21 00:47:46 -05:00
Justin M. Keyes
0d206da461 Merge #37057 docs 2025-12-21 00:22:36 -05:00
Olivia Kinnear
ad330e99d1 fix(statusline): diagnostics spacing #36897 2025-12-20 23:58:38 -05:00
Justin M. Keyes
4485e715fb fix(options): deprecate 'gdefault', 'magic' 2025-12-20 22:07:27 -05:00
Justin M. Keyes
060993e438 docs: misc, lsp 2025-12-20 22:07:27 -05:00
Bryan Turns
bef68ba266 docs(lua): iInconsistent vim.keymap param name #37026
Problem: vim.keymap.del has 'modes' as it's first argument while vim.keymap.set
has 'mode' as it's first argument despite both 'mode' and 'modes' taking in the
same type input of String or String[].

Solution: Updated vim.keymap.set docs to refer to it's first argument
as 'modes'.
2025-12-20 19:26:44 -05:00
Eric Wong
6228acb74f feat(cmdline): completion for :TOhtml #37045 2025-12-20 19:17:38 -05:00
zeertzjq
245a4696a2 vim-patch:1a4a1b9: runtime(zip): Use :lcd instead of :cd in zip.vim (#37054)
closes: vim/vim#18967

1a4a1b9fa6

Co-authored-by: zoumi <zoumi@users.noreply.github.com>
2025-12-20 23:26:28 +00:00
zeertzjq
9b55f037d2 vim-patch:64799a5: runtime(doc): clarify the behavior of CTRL-Z
fixes: vim/vim#18975

64799a5080

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-21 07:12:38 +08:00
zeertzjq
03aef8fd2a vim-patch:fe8c8b1: runtime(doc): fix outdated :function help
Since patch 7.4.264 a leading "g:" is skipped.

closes: vim/vim#18976

fe8c8b1e85
2025-12-21 07:12:38 +08:00
Harsh Kapse
043f5a291a feat(health): show available queries for treesitter (#37005)
Problem: Outdated query files in `runtimepath` can trigger errors
which are hard to diagnose.

Solution: Add section to `:check treesitter` that lists all query 
files in `runtimepath`, sorted by language and query type. Files
are listed in `runtimepath` order so that the first of multiple entry
is typically the one that is used.

Note: Unlike the `nvim-treesitter` health check, this does not try
to parse the queries so will not flag incompatible ones (which would
be much more expensive).
2025-12-20 16:34:24 +01:00
Sean Dewar
eac2f0443e feat(tag): respect jumpoptions=view when popping tagstack (#37021)
Problem: jumpoptions=view has no effect when popping from the tagstack.
Solution: make it work.
2025-12-19 23:32:09 +00:00
zeertzjq
ca0eb8b1d1 vim-patch:757b42a: runtime(tutor): Chapter 2: consistently use upper case letter, fix typo after 1e3e1ba067c79a
Chapter 2: Fix missing "R" after 1e3e1ba067c79a when using register from insert
mode. While at it, consistently use upper case letter for CTRL-R in the
new-tutor.

related: vim/vim#18950

757b42ab07

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-19 08:12:55 +08:00
zeertzjq
b2b9b78209 vim-patch:1e3e1ba: runtime(tutor): Update Chapter 2, remove mentioning surround plugin
fixes: vim/vim#18950

1e3e1ba067

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-19 08:12:54 +08:00
yilisharcs
04357f2eff vim-patch:fe0bafc: runtime(compiler): improve rust errorformat (#37022)
This commit adds match patterns for:
- warnings with error codes (warning[E0123]: foobar)
- valid nightly unicode entries

closes: vim/vim#18957

fe0bafc728
2025-12-19 07:53:58 +08:00
zeertzjq
c08139d790 fix(lua): don't remove first char of non-file stacktrace source (#37008) 2025-12-18 08:09:16 +08:00
yilisharcs
43db13bfa8 vim-patch:bd5e882: runtime(compiler): Match gcc.vim make error format (#37012)
Problem:  gcc.vim interprets "make: *** [Makefile" in the error message
          "make: *** [Makefile:2: all] Error 1" as a valid filename.
Solution: Add pattern to extract the filename correctly. Note that this
	  doesn't remove the dangling "]" from the output ("all]").

closes: vim/vim#18956

bd5e882a91
2025-12-18 07:08:57 +08:00
glepnir
856391bc7f fix(health): "q" keymap not set when health.style=float #37007
Problem:
The q keymap is already set in open_floating_preview, so maparg('q') is not empty.

Solution:
Add a health.style check before setting the q keymap.
2025-12-17 10:53:08 -05:00
glepnir
0197f13ed4 fix(lsp): sort items when completeopt include fuzzy #36974
Problem: When fuzzy is enabled and the prefix is not empty,
items are not sorted by fuzzy score before calling fn.complete.

Solution: Use matchfuzzypos to get the scores and sort the items
by fuzzy score before calling fn.complete.
2025-12-16 22:39:47 -05:00
jdrouhard
8a94daf80e fix(lsp): simplify semantic tokens range request logic #36950
By simplifying the way range is supported, we can fix a couple issues as
well as making it less complex and more efficient:

* For non-range LSP servers, don't send requests on WinScrolled. The
  semantic tokens module has been reworked to only send one active
  request at a time, as it was before range support was added. If range
  is not supported, then send_request() only fires if there's been a
  change to the buffer's document version.
* Cache the server's support of range and delta requests when attaching
  to a buffer to save the lookup on each request.
* Range requests always use the visible window, so just use that for the
  `range` param when sending requests when range is supported by the
  server. This reduces the API surface area of send_request().
* Debounce the WinScrolled autocmd requests in the same the way requests
  are debounced when the buffer contents are changing. Should allow
  scrolling via mouse wheel or holding down "j" or "k" work a bit
  smoother.

The previous iteration of range support allowed multiple active requests
to be in progress simultaneously. However, a bug was preventing any but
the most recent request to actually apply to the client's highlighting
state so that complexity was unused. It was effectively only using one
active request at a time but was just using range requests on
WinScrolled events instead of a full (or delta) request when the
document version changed.
2025-12-16 22:06:55 -05:00
Olivia Kinnear
bd225422a5 fix(lsp): tests for :lsp, rename start/stop
- Rename :lsp start/stop to enable/disable
- Move lua section of `:lsp` to `vim/_core`
- Add tests
2025-12-16 13:46:08 -05:00
brianhuster
63abb1a88f feat(lsp): builtin :lsp command
Problem:
- Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
  claims to be a "data-only" plugin, in fact it still provides some
  user-facing commands because they haven't been upstreamed to Nvim.

Solution:
- Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp
  restart`, `:lsp start` and `:lsp stop` respectively.

Co-authored-by: glepnir <glephunter@gmail.com>
2025-12-16 13:46:04 -05:00
Ian Beckett
89d26d61d2 fix(vim.pack): increase default timeout #36992 2025-12-16 13:22:05 -05:00
zeertzjq
1d22b05f8d docs: update support.txt (#36903) 2025-12-16 12:55:32 +08:00
Justin M. Keyes
d5cfca5b76 feat(docs): numbered listitems 2025-12-15 13:55:15 -05:00
Justin M. Keyes
31dfecb458 docs: misc, editorconfig
fix https://github.com/neovim/neovim/issues/36858
2025-12-15 13:55:15 -05:00
Tristan Knight
8165427b4d fix(lsp): correct capability checks for dynamic registration (#36932)
Refactor capability checks in Client:_supports_registration and
Client:supports_method to properly handle dynamicRegistration and unknown
methods. Now, dynamic capabilities are checked before assuming support for
unknown methods, ensuring more accurate LSP feature detection.
2025-12-15 13:23:57 -05:00
Alejandro Exojo
46220afef8 fix(man.lua): show_toc condition may cause infinite loop #36979
`lnum` gets set with `vim.fn.nextnonblank`, which returns 0 on failure,
and which is truthy on Lua.
2025-12-15 11:02:10 -05:00
Yochem van Rosmalen
31cb37687a fix(health): check shell performance using vim.fn.system() #36980
Problem:
`vim.system()` doesn't invoke a shell, while the Vimscript function
`system()` does.

Solution:
Revert the change from 35af766de6 and use `vim.fn.system()` again to
actually invoke a shell.
2025-12-15 10:53:53 -05:00
Riley Bruins
976a47e81b Revert "refactor(treesitter): use scratch buffer for string parser" #36964
This reverts commit 2a7cb32959.
2025-12-15 02:09:36 -05:00
Justin M. Keyes
981ea41abb feat(tui): ghostty builtin terminfo #36963
Problem:
The builtin terminfo defs don't include xterm-ghostty, so features like
`kTerm_set_underline_style` are missing when building without unibilium.

Solution:
- Add ghostty to `gen_terminfo.lua`.
  - Note: The ncurses defs are somewhat different than what ghostty ships.
- Special-case ghostty in `terminfo_from_builtin`.
2025-12-15 02:07:51 -05:00
zeertzjq
02e10d5101 vim-patch:64eeff5: runtime(fvwm): Update fvwm keywords (#36968)
fixes: vim/vim#18924

64eeff5784

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-15 01:09:14 +00:00
zeertzjq
f5e39560ff vim-patch:9.1.1980: filetype: N-Quads files are not recognized (#36967)
Problem:  filetype: N-Quads files are not recognized
Solution: Detect *.nq files as nq filetype

Reference:
- https://www.w3.org/TR/n-quads/

closes: vim/vim#18923

6c027b25f1

Co-authored-by: Gordian Dziwis <gordian@dziw.is>
2025-12-15 00:55:41 +00:00
Jaehwang Jung
63737e6e73 fix(treesitter): no injection highlighting on last line #36951
Problem:
If the last visible line in a window is not fully displayed, this line
may not get injection highlighting. This happens because line('w$')
actually means the last *completely displayed* line.

Solution:
Use line('w$') + 1 for the botline.

This reverts 4244a96774
"test: fix failing lsp/utils_spec #36609",
which changed the test based on the wrong behavior.
2025-12-14 19:01:49 -05:00
Shmerl
1363ef7d50 fix(vim.loader): randomized AppImage path pollutes luac cache #36944
different approach to 78bbe53f76
2025-12-14 13:46:53 -05:00
phanium
8c7023b7b3 docs(luv): hrtime() is integer (sync from upstream)
hrtime() is integer:
5e97827395/src/misc.c (L430)

Sync from https://github.com/luvit/luv/commit/5e978273
2025-12-14 10:15:03 +00:00
zeertzjq
1bde5a91c4 vim-patch:bfb9f5c: runtime(doc): Rename NoDefaultCurrentDirectoryInExePath tag (#36921)
- Add leading "$" to match other environment variable tags.
- Clarify :help $NoDefaultCurrentDirectoryInExePath.

closes: vim/vim#18895

bfb9f5c40e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-12-12 09:13:15 +08:00
zeertzjq
5a83f23430 vim-patch:98a0cbf: patch 9.1.1971: crash with invalid positional argument 0 in printf() (#36919)
Problem:  crash with invalid positional argument 0 in printf()
Solution: Reject positional arguments <= 0.

closes: vim/vim#18898

98a0cbf05b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-12 08:14:58 +08:00
Olivia Kinnear
054eaf8493 feat(lsp): warn about unknown filetype #36910 2025-12-11 13:58:40 -05:00
Shmerl
78bbe53f76 fix(vim.loader): randomized AppImage path pollutes luac cache #35636
Problem:
When using the Nvim appimage, `~/.cache/nvim/luac` directory can grow to
250,000+ files.

Example of 2 identical files in `./luac/`:

    %2ftmp%2f.mount_nvim.a65Rja0%2fusr%2fshare%2fnvim%2fruntime%2flua%2fvim%2ftreesitter.luac
    %2ftmp%2f.mount_nvim.aNpxXgo%2fusr%2fshare%2fnvim%2fruntime%2flua%2fvim%2ftreesitter.luac

Analysis:
The `nvim.appimage` mounts nvim at a different temporary path each time
it is invoked. The naming scheme of these cache files is random, which
defats the purpose of the cache creates N new files on every launch of
nvim.

Steps to reproduce:
1. install `nvim.appimage`
2. `mv ~/.cache/nvim/luac ~/.cache/nvim/luac.backup`
3. `nvim`
4. Observe contents of `~/.cache/nvim/luac/`
5. Close nvim and run `nvim` again
6. Observe contents of `~/.cache/nvim/luac/` and see that new identical
   files have been added with a different mount prefix

Solution:
When running from an appimage, trim the random part of the filepaths.
2025-12-10 13:33:33 -05:00
skewb1k
b87bdef2a8 fix(lua): relax vim.wait() timeout validation #36900
Problem:
After bc0635a9fc `vim.wait()` rejects floats
and NaN values.

Solution:
Restore the prior behavior, while still supporting `math.huge`. Update
tests to cover float case.
2025-12-10 09:44:05 -05:00
ymich9963
d2e445e1bd docs(options): shell-powershell #36881
Problem:
Current options for powershell and pwsh had mistakes and rationale
behind them was not clear.

Solution:
Update the suggested options by splitting up powershell and pwsh, as
well as ensuring that all options work and rationale is documented and
discussed.
2025-12-10 00:57:16 -05:00
zeertzjq
abb907a47d vim-patch:927ad16: runtime(vim): Update base syntax, match full :help command (#36882)
closes: vim/vim#18833

927ad166a4

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-12-09 22:26:01 +08:00
zeertzjq
747cf30c37 vim-patch:9.1.1965: q can accidentally start recording at more prompt (#36879)
Problem:  When exiting at the end of the more prompt (at the hit enter
          prompt) by hitting q the recording mode will be started.
          (Jakub Łuczyński)
Solution: Don't add the q key to the typeahead buffer
          in the function wait_return (Bjoern Foersterling)

fixes: vim/vim#2589
closes: vim/vim#18889

ecce3497fa

Co-authored-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
2025-12-09 22:25:47 +08:00
zeertzjq
3bc9a5b5d2 vim-patch:9.1.1963: diff: missing diff size limit for xdiff (#36877)
Problem:  diff: missing diff size limit for xdiff
Solution: Impose file size limit for internal diff (xdiff)
          (Yee Cheng Chin).

Git imposes a hard cap on file size for content that it passes to xdiff
(added to Git in dcd1742e56e, defined in xdiff-interface.h), due to
integer overflow concerns in xdiff. Vim doesn't specify such a limit
right now, which means it's possible for a user to diff a large file
(1GB+) and trigger these overflow issues.

Add the same size limit (1GB minus 1MB) to Vim and simply throws an
error when Vim encounters files larger than said limit. For now, reuse
the same error message regarding internal diff failures. There is no
need to add the same limit for external diff as it's up to each tool to
error check their input to decide what is appropriate or not.

closes: vim/vim#18891

4af6d9755c

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-12-09 22:25:18 +08:00
zeertzjq
dfbbc6dd6b vim-patch:f958d35: runtime(julia): Update Julia runtime files (#36876)
Port changes from JuliaEditorSupport/julia-vim made during 2022-2025.
Most notably:

- 88f178c Do not reset shiftwidth/expandtab at undo
- f17257a Allow else block in try/catch
- 7946ce3 Support public statements (added in Julia v1.11.0-DEV.469)

f958d35723

Co-authored-by: Sergio Alejandro Vargas <savargasqu+git@unal.edu.co>
2025-12-09 22:25:04 +08:00
zeertzjq
58d5d97719 vim-patch:98ef843: runtime(rust): use textwidth=100 for the Rust recommended style (#36875)
The help text here said 99 was the recommended style for the standard
library, but I can't find a citation for this anywhere. In contrast the
Rust Style Guide hosted on rust-lang.org
[says](https://doc.rust-lang.org/stable/style-guide/#indentation-and-line-width)
the maximum line width is 100, and rustfmt
[agrees](37aa2135b5/src/tools/rustfmt/src/config/options.rs (L570)).

Having the two disagree causes an annoying off-by-one error in vim: if
you configure vim to highlight too-long lines then it will occasionally
complain about a line that rustfmt refuses to fix.

closes: vim/vim#18892

98ef8433b6

Co-authored-by: Aaron Jacobs <jacobsa@google.com>
2025-12-09 20:42:12 +08:00
zeertzjq
c24cc4c352 vim-patch:b22c145: runtime(doc): document change in Windows behavior for patch 9.1.1947 (#36874)
closes: vim/vim#18886

b22c145c22

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-09 20:41:49 +08:00
Mathias Fußenegger
c5d4050586 Revert "feat(lsp): support version in textDocument/publishDiagnostics #36754" (#36865)
This reverts commit 03d6cf7aae.

See https://github.com/neovim/neovim/pull/36754#issuecomment-3626115697
The change was supposed to avoid showing stale diagnostics but had the
opposite effect.
2025-12-09 13:29:21 +01:00