10155 Commits

Author SHA1 Message Date
zeertzjq
e254688016 fix(terminal): handle ED 3 (clear scrollback) properly (#21412)
Problem:  Terminal doesn't handle ED 3 (clear scrollback) properly.
Solution: Add vterm callback for sb_clear().

Also fix another problem that scrollback lines may be duplicated when
pushing to scrollback immediately after reducing window height, as can
be seen in the changes to test/functional/terminal/window_spec.lua.
2026-02-09 11:28:00 +00:00
zeertzjq
6ad73421cb vim-patch:b422a33: runtime(gdb): Update syntax and ftplugin (#37783)
- Change syntax file maintainer.
- Add Guile and Python command highlighting.
- Update command list to version 12.
- Add foldable regions for the commands 'define', 'if' and 'while'
  multiline commands.
- Support documented partial command names.
- Add matchit, browsefilter, and comment formatting support.
- Support embedded C in compiler {code|print} commands.
- Add largely complete settings highlighting and folding.
- Add syntax tests (incomplete).

Thanks to Claudio Fleiner for many years of maintenance.

closes: vim/vim#10649

b422a33ac2

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-09 00:19:39 +00:00
Tomasz N
eaacdc9bdf fix(lsp): ignore empty response on trigger completion #37663
Problem:
Empty response affects server start boundary computed before.

Solution:
Ignore empty responses. This is mostly micro-optimization that avoids
extending existing results with empty responses.
2026-02-08 16:25:47 -05:00
Mike J McGuirk
15ff454443 feat(lsp): display codelens as virtual lines, not virtual text #36469
Problem: Code lenses currently display as virtual text on the same line
and after the relevant item. While the spec does not say how lenses
should be rendered, above the line is most typical. For longer lines,
lenses rendered as virtual text can run off the side of the screen.

Solution: Display lenses as virtual lines above the text.

Closes https://github.com/neovim/neovim/issues/33923

Co-authored-by: Yi Ming <ofseed@foxmail.com>
2026-02-08 16:10:41 -05:00
Evgeni Chasnovski
0f73873d4f fix(pack): close confirmation buffer, not tabpage #37756 2026-02-08 09:15:16 -05:00
Mike J McGuirk
6cb3254c2f docs(eval): fix fn.strchar types #37737
Problem: The following strchar functions have incorrect types:

strcharlen() - Currently any. Always returns an integer, including on
error

strcharpart() - The skipcc annotation does not specify that 0 and 1 are
valid. These inputs are required for vimscript usage. The current
return type is any, even though the function returns an empty string
on error

strchars() - The skipcc annotation does not specify that 0 and 1 are
valid

Solution: Update the problem types.
2026-02-08 08:07:49 -05:00
Mike J McGuirk
6771b10b88 docs(eval): correct types for getcharsearch, setcharsearch #37734
Problem: In eval.lua, setcharsearch() has an incorrect param type,
causing Lua_Ls to display an error when a valid table is passed.

While getcharsearch correctly states that it returns a table, the type
is non-specific about the contents.

Solution: Update eval.lua with the correct types.
2026-02-08 08:06:55 -05:00
zeertzjq
deac3fc13f vim-patch:27630b2: runtime(python3complete): remove trailing white space
related: vim/vim#19354

27630b28ad

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2026-02-08 07:07:50 +08:00
zeertzjq
289eb2edd9 vim-patch:d15c718: runtime(compiler): fix space escape in pyright
closes: vim/vim#19354

d15c718038

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2026-02-08 07:07:15 +08:00
zeertzjq
a24f190531 vim-patch:1ff2239: runtime(compiler): add pyright Python type checker
closes: vim/vim#19017

1ff2239053

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2026-02-08 07:06:59 +08:00
zeertzjq
1196bf8f40 vim-patch:7ccb81b: runtime(tar): Make the path traversal detection more robust (#37764)
closes: vim/vim#19341

7ccb81bdb6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-07 23:03:07 +08:00
zeertzjq
d2141396cd vim-patch:422ef98: runtime(doc): fix pattern problem in cmdline.txt (#37753)
closes: vim/vim#19322

422ef984b5

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2026-02-06 12:55:07 +00:00
Mathias Fußenegger
c4f322b769 refactor(lsp): always fetch lenses again in codelens.run (#37720)
The auto-refresh has a bit of a delay so it can happen that when a user
runs `codelens.run` it operates on an outdated state and either
does nothing, or fails.

This changes the logic for `.run` to always fetch the current lenses
before (optional) prompt and execution.

See discussion in https://github.com/neovim/neovim/pull/37689#discussion_r2764235931

This could potentially be optimized to first check if there's local
state with a version that matches the current buf-version, but in my
testing re-fetching them always was quickly enough that `run` still
feels instant and doing it this way simplifies the logic.

Side effect of the change is that `.run` also works if codelens aren't
enabled - for power users who know what the codelens would show that can
be useful.
2026-02-06 13:31:44 +01:00
zeertzjq
6dd0a7d60a vim-patch:9.1.2135: tests: tar plugin does not consider 'nowrapscan' (#37752)
Problem:  search() is used to check for the message from tar that
          indicates leading slashes found in the tar archive, or to
          check for the leading slashes themselves. However, if
          'nowrapscan' is in effect these searches are limited to the
          last line and don't find any results. This causes the warning
          message from tar to be seen in the buffer, the "Path Traversal
          Attack Detected" message to be omitted, and editing actions
          can fail. This can be seen, for example, when editing
          src/testdir/samples/evil.tar.
Solution: Use the 'w' flag for search() (Kevin Goodsell)

closes: vim/vim#19333

18d844e365

Co-authored-by: Kevin Goodsell <kevin-opensource@omegacrash.net>
2026-02-06 20:25:14 +08:00
zeertzjq
d3bfde60ad vim-patch:56d470a: runtime(lf): update syntax to support lf version r41 (#37750)
Also, mark @CatsDeservePets as maintainer.

closes: vim/vim#18640

56d470a008

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2026-02-06 12:17:19 +00:00
luukvbaal
e198037148 fix(ui2): always route to dialog when cmdline is open #37730
Problem:  Messages emitted while cmdline is open are not shown with
          cmdline message target.
Solution: Route to dialog window when cmdline is open.
2026-02-05 14:54:22 -05:00
Christian Clason
13a9cdc6b4 docs(lua): vim.keymap.set takes no noremap #37723
Problem: Unlike `nvim_keymap_set`, `vim.keymap.set` uses the non-negated
`remap` instead of `:set`'s `noremap`, but the documentation for this
got lost sometime before Nvim 0.10.

Solution: Restore the lost documentation and make it more explicit.
2026-02-05 08:43:04 -05:00
zeertzjq
6f27eb1591 ci(cirrus): update to FreeBSD 15.0 (#37716) 2026-02-05 21:39:08 +08:00
luukvbaal
bf68ba40a0 refactor: rename _extui => _core.ui2 #37692
Problem:
_extui module name is confusing and should eventually end up in _core/.

Solution:
Move it there and name it ui2.
2026-02-05 07:45:45 -05:00
zeertzjq
396edf1e46 vim-patch:61044eb: runtime(haskellcomplete): fix Undefined variable b:completingLangExtension. (#37712)
closes: vim/vim#19259

61044eb536

Co-authored-by: Arkissa <mrarkssac@gmail.com>
2026-02-05 01:32:40 +00:00
zeertzjq
da60b80a74 vim-patch:03b42b2: runtime(doc): add note for -complete=shellcmdline (#37713)
closes: vim/vim#19330

03b42b2926

Co-authored-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
2026-02-05 01:26:27 +00:00
luukvbaal
72a557c61b fix(ui2): only copy highlight marks when expanding cmdline #37709
Problem:  Error copying over multi-line message span marks to expanded cmdline.
Solution: Only copy over the highlight marks as intended.
2026-02-04 19:23:22 -05:00
luukvbaal
db2a54996e feat(ui2): replace message by its ID #37672
Problem:  UI2 does not implement the msg_show event msg_id parameter.
Solution: Store message IDs currently shown in the cmd/msg buffers.
          Set extmarks spanning the message which are used to replace
          a still visible message when a new message with the same ID
          is received.
2026-02-04 14:11:35 -05:00
Kevin Locke
2a906bfad6 docs: setting g:clipboard after provider init #37705
Problem:
Users may be unaware that setting `g:clipboard` after providers are
initialized has no effect, and that `has('clipboard')` initializes
providers, as in #13062.

Solution:
Note the restriction and link to workarounds in FAQ for discoverability.
2026-02-04 13:53:08 -05:00
Sean Dewar
9655bd560f fix(ui2): don't adjust dialog pos for pum wildmenu (#37695)
Problem:  Dialog position unnecessarily adjusted for pum wildmenu.
Solution: Apply no offset if the pum is visible.
2026-02-04 13:15:34 +01:00
zeertzjq
8f1667445e vim-patch:ac5af8e: runtime(vim): Fix for :VimKeywordPrg when syntax does not match
When using vim9-syntax plugin, :VimKeywordPrg does not lookup functions
correctly, as it relies solely on syntax names to find the help topic.

The syntax keyword used for builtin function is vi9FuncNameBuiltin in
vim9-syntax plugin, not vimFuncName expected by :VimKeywordPrg, so the
fallback rules apply, and there is no fallback rule for function calls.

Fix by just checking if the first char after topic is '(', and if so
assume help topic is a function.

closes: vim/vim#19320

ac5af8ecd3

Co-authored-by: Mark Woods <mwoods.online.ie@gmail.com>
2026-02-04 07:14:12 +08:00
zeertzjq
f3e2e718ec vim-patch:c65643c: runtime(vim): Update ftplugin, fix option variable 'keywordprg' matching
- Match &option, and &[lg]:option variables.
- Match Ex commands after :bar.
- Fix matching of pre and post context text.
- Style - use '..' for string concatenation.

fixes vim/vim#17567
closes: vim/vim#17653

c65643cbec

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-04 07:13:06 +08:00
Tomasz N
90abd2613d fix(lsp): don't empty server start-boundary by next client response #37665
Problem:
Server start boundary can be emptied by response provided by next client.

Solution:
Don't empty it when extending the result list.
2026-02-03 15:30:05 -05:00
jdrouhard
9278f792c3 feat(lsp): support range + full semantic token requests #37611
From the LSP Spec:
> There are two uses cases where it can be beneficial to only compute
> semantic tokens for a visible range:
>
> - for faster rendering of the tokens in the user interface when a user
>   opens a file. In this use case, servers should also implement the
>   textDocument/semanticTokens/full request as well to allow for flicker
>   free scrolling and semantic coloring of a minimap.
> - if computing semantic tokens for a full document is too expensive,
>   servers can only provide a range call. In this case, the client might
>   not render a minimap correctly or might even decide to not show any
>   semantic tokens at all.

This commit unifies the usage of range and full/delta requests as
recommended by the LSP spec and aligns neovim with the way other LSP
clients use these request types for semantic tokens.

When a server supports range requests, neovim will simultaneously send a
range request and a full/delta request when first opening a file, and
will continue to issue range requests until a full response is
processed. At that point, range requests cease and full (or delta)
requests are used going forward. The range request should allow servers
to return a result faster for quicker highlighting of the file while it
works on the potentially more expensive full result. If a server decides
the full result is too expensive, it can just error out that request,
and neovim will continue to use range requests.

This commit also fixes and cleans up some other things:

- gen_lsp: registrationMethod or registrationOptions imply dynamic
  registration support
- move autocmd creation/deletion to on_attach/on_detach
- debounce requests due to server refresh notifications
- fix off by one issue in tokens_to_ranges() iteration
2026-02-03 13:16:12 -05:00
Justin M. Keyes
f5931102f8 Merge #37626 feat(lsp)!: textDocument/codeLens as decoration provider 2026-02-03 09:46:37 -05:00
Yi Ming
6f733f4a9b fix(lsp): avoid scheduling client deletion before LspNotify #37685
Problem:
`Client.on_exit` runs `Client._on_detach` and the client removal logic
within two separate `vim.schedule` sequentially. However, since
`Client._on_detach` executes `LspNotify` inside `vim.schedule`, this
causes `LspNotify` to be executed after the client removal, which is
scheduled first. At that point, a valid `Client` can no longer be
retrieved within the autocmd callback.

Solution:
Put the client deletion inside the `vim.schedule` call.
2026-02-03 09:33:14 -05:00
Yi Ming
965468fca1 feat(lsp): support workspace/codeLens/refresh 2026-02-03 22:25:21 +08:00
Yi Ming
fe23168e2b feat(lsp)!: reimplement textDocument/codeLens as decoration provider 2026-02-03 22:25:18 +08:00
Pavel Pisetski
41cac54325 feat(defaults): exclude temp dirs from 'shada' oldfiles #37631
Problem:
Temporary files from /tmp/ and /private/ paths clutter :oldfiles list.
Additionally, the documented Windows default (rA:,rB:) was never applied
due to a missing platform condition.

Solution:
Drop platform-specific shada differences and default to excluding
/tmp/ and /private/ paths.
2026-02-03 08:31:37 -05:00
luukvbaal
3038f0191e fix(ui2): wildmenu hidden behind dialog window #37684
Problem:  The wildmenu is hidden behind the dialog window with "list" in 'wildmode'.
          Global ('laststatus' set to 3) statusline is hidden behind the
          pager window.
Solution: Check wildmenumode() to adjust the dialog position when necessary.
          Ensure pager is positioned above the global statusline with 'laststus' set to 3.
2026-02-03 08:17:33 -05:00
zeertzjq
d594407735 test: unskip msgpackparse() test on Windows (#37683)
Not sure when it was fixed, but it passes now.
2026-02-03 16:31:27 +08:00
zeertzjq
4c0d1aceec vim-patch:093d0cb: runtime(doc): Clarify the behaviour of command completion functions (#37680)
closes: vim/vim#19294

093d0cb1cf

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-03 03:16:17 +00:00
luukvbaal
8c7bbfba3d fix(ui2): callbacks reference stale message-window handles #37673
Problem:  Scheduled callbacks reference potentially outdated window
          handles e.g. after switching tabpage.
Solution: Use ext.wins which stores the updated window handles.
2026-02-02 10:54:26 -05:00
zeertzjq
0566767d7d vim-patch:2e4c98b: runtime(vim): Update base syntax, match Vim9 :unlet command (#37662)
closes: vim/vim#19290

2e4c98b6f3

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-01 23:22:51 +00:00
zeertzjq
5da2a4b59a vim-patch:079700e: runtime(doc): Improve the description at :help :cwindow (#37661)
Describe the "height" argument when opening the quickfix window.

See: vim/vim#19302 ("[cl]window" has different behaviour from "[cl]open" about
their argument [height])

related: vim/vim#19302
closes:  vim/vim#19305

079700ee45

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-01 23:05:34 +00:00
zeertzjq
1906da52db fix(lua): close vim.defer_fn() timer if vim.schedule() failed (#37647)
Problem:
Using vim.defer_fn() just before Nvim exit leaks luv handles.

Solution:
Make vim.schedule() return an error message if scheduling failed.
Make vim.defer_fn() close timer if vim.schedule() failed.
2026-02-01 21:29:19 +08:00
Maria Solano
0501c5fd09 fix(lsp): call on_list before reading loclist #37645
Problem:
`on_list` is supposed to replace the default list-handler. With the current order of these `if` statements `on_list` won't be called if `loclist` is true.

Solution:
Change the order of the relevant blocks.
2026-02-01 07:18:16 -05:00
zeertzjq
e283a60a69 vim-patch:0195622: runtime(qf): Update quickfix syntax
closes: vim/vim#19296

01956225bc

Co-authored-by: GX <59413576+gx089@users.noreply.github.com>
2026-02-01 08:31:38 +08:00
zeertzjq
c74d5ceda1 vim-patch:dd9f7e6: runtime(doc): Fix some overlength lines
closes: vim/vim#19286

dd9f7e6cbb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-01 08:30:59 +08:00
zeertzjq
b6237de224 vim-patch:c99aaf4: runtime(colors): improve catppuccin colorscheme
- fix readability issue with IncSearch/CurSearch
- add highlights to some of ftplugins distributed with vim

closes: vim/vim#19295

c99aaf4c87

Co-authored-by: Maxim Kim <habamax@gmail.com>
2026-02-01 08:22:07 +08:00
Harsh Kapse
36db6ff2c1 fix(lsp): use LSP textEdit range for completion start boundary (#37491)
Previously, adjust_start_col returned nil when completion items had
different start position from lsp textEdit range
This caused the completion to fall back to \k*$ which ignores the
non-keyword characters

Changes:
- adjust_start_col: now returns the minimum start postion among all
items instead of nil
- _lsp_to_complete_items - normalizes the items by adding the gap between
  current and minimum start

Fixes: https://github.com/neovim/neovim/issues/37441
2026-01-30 15:34:42 +01:00
zeertzjq
a60d5f863e vim-patch:b817536: runtime(tera): update syntax files to support many more tera code (#37622)
This includes macros, keys etc. which were not highlighted before.

closes: vim/vim#19276

b817536b8f

Co-authored-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
2026-01-30 00:08:49 +00:00
Evgeni Chasnovski
1aa81290a4 docs(pack): clarify caveats about installing based on the lockfile 2026-01-29 16:24:33 +02:00
zeertzjq
484f455402 test(terminal): status is -1 in TermClose if buffer is deleted (#37609) 2026-01-29 08:29:49 +00:00
zeertzjq
4e52a2d386 vim-patch:97d1255: runtime(colors): Update colorscheme and add TitleBar/TitleBarNC
closes: vim/vim#18513

97d1255558

Co-authored-by: Maxim Kim <habamax@gmail.com>
2026-01-29 09:27:42 +08:00