Commit Graph

10179 Commits

Author SHA1 Message Date
phanium
179e7fccd7 fix(ui2): incomplete :echon message in g< pager #37819
Problem:
`:echo 1 | echon 2<cr>g<` shows "2", but should be "12".

Solution:
Don't clear temp msg (g<) if we are appending.
2026-02-12 11:10:37 -05:00
Justin M. Keyes
e8ace82093 Merge #37096 from justinmk/doc2 2026-02-12 08:15:21 -05:00
Michele Campeotto
d0822bbd15 fix(treesitter): highlight group for EditQuery captures #36265
fix(treesitter): more distinctive highlight for EditQuery captures

Problem: EditQuery shows captures in the source buffer using the Title
highlight group, which could be too similar to Normal.

Solution: Use a virtual text diagnostic highlight group: they are
displayed in a similar manner to the query captures so we can assume
that the color scheme should have appropriate styling applied to make
them visible.
2026-02-12 08:07:13 -05:00
Justin M. Keyes
8a901a52e1 fix(health): avoid silent failure 2026-02-12 13:46:53 +01:00
Justin M. Keyes
5870627a24 docs: vim.fs path expansion
fix #37583
2026-02-12 13:46:53 +01:00
Justin M. Keyes
858576777e docs: lsp, options, promptbuf
Close #37630
Close #37682
Close #37762
Close #37785

Co-authored-by: Daniel Schmitt <d.schmitt@lansoftware.de>
Co-authored-by: Duane Hilton <duane9@gmail.com>
Co-authored-by: NeOzay <colpaert.benoit@gmail.com>
Co-authored-by: Yi Ming <ofseed@foxmail.com>
Co-authored-by: "Justin M. Keyes" <justinkz@gmail.com>
2026-02-12 13:46:45 +01:00
Justin M. Keyes
fd69b71119 refactor(lsp): drop once(), use _memoize() #37829 2026-02-12 07:15:20 -05:00
wjyoung65
06a78d43f5 docs(dev): fix references to LOG_DEBUG #37825 2026-02-12 04:20:01 -05:00
Andrew Braxton
5468e6a452 fix(pack): skip :redraw! if headless #37782
Otherwise, output will be concatenated without newlines.

TODO: the ":redraw!" call can be dropped entirely after ui2 becomes the default.
2026-02-12 04:15:53 -05:00
skewb1k
6b4ec2264e feat(stdlib): vim.json.decode() can allow comments #37795
Problem:
`vim.json.decode()` could not parse JSONC (JSON with Comments)
extension, which is commonly used in configuration files.

Solution:
Introduce an `skip_comments` option, which is disabled by default. When
enabled, allows JavaScript-style comments within JSON data.
2026-02-11 06:54:57 -05:00
zeertzjq
3e843a2891 vim-patch:36f4498: runtime(java): Allow for org.TopLevelType.NestedType return types (#37810)
vim-patch:36f4498: runtime(java): Allow for org.TopLevelType<T>.NestedType return types

closes: vim/vim#19349

36f4498710

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-02-11 08:02:50 +08:00
zeertzjq
d1238b9da4 vim-patch:61e96c5: runtime(doc): Fix typo in runtime/doc/cmdline.txt (#37809)
closes: vim/vim#19378

61e96c5a95

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-02-11 08:02:23 +08:00
Olivia Kinnear
0c46ea7d38 feat(lua): add Iter:unique() (#37592) 2026-02-10 11:43:47 -06:00
Evgeni Chasnovski
14c708634e fix(vim.fs): make rm() work with symlink to a directory 2026-02-10 16:40:12 +00:00
zeertzjq
c3defb4b45 vim-patch:5ed3723: runtime(ruby): Update for Vim 9.2 release (#37806)
closes: vim/vim#19316

5ed37232bb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-10 22:14:21 +08:00
Yochem van Rosmalen
a6252c6683 refactor(help): move escaping logic to Lua #37757
Problem:
Escaping logic for {subject} in ex cmd `:help {subject}` is done in a
messy 200+ lines C function which is hard to maintain and improve.

Solution:
Rewrite in Lua. Use `string.gsub()` instead of looping over characters
to improve clarity and add many more tests to be able to confidently
improve current code later on.
2026-02-10 07:43:17 -05:00
glepnir
16c8a908ef fix(health): check stable release for non-nightly build #36715
Problem:
Nvim version is always compared to latest upstream HEAD.

Solution:
If current Nvim is not a nightly build, check upstream stable version.
2026-02-10 06:17:37 -05:00
glepnir
b7070778b9 fix(api): cterm type in highlight keyset #37802
Problem: cterm field in Dict(highlight) is declared as Union(Integer, String)
but it actually expects a Dict(highlight_cterm).

Solution: change cterm type to DictAs(highlight__cterm) and simplify the
handling in dict2hlattrs since type validation and empty array compat are
already handled by api_dict_to_keydict.
2026-02-10 06:05:53 -05:00
zeertzjq
32c94621ad vim-patch:9e456e5: runtime(doc): clarify the use of 'iskeyword' option value
In particular, also mention the difference between the regex atom \k and
what Vim considers for a word character.

closes: vim/vim#18688

9e456e52df

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-10 06:44:30 +08:00
zeertzjq
0aacc043a3 vim-patch:4442ac5: runtime(nginx): Update nginx syntax script
closes: vim/vim#19374

4442ac53f7

Co-authored-by: Chris Aumann <me@chr4.org>
2026-02-10 06:42:48 +08:00
zeertzjq
8fb1a8d4ca vim-patch:e92998e: runtime(nginx): highlight Lua in set_by_lua_block in syntax script
The set_by_lua_block directive of the Lua module takes an additional
variable as an argument which currently breaks the detection of inline
Lua blocks. For example:

    set_by_lua_block $myvar {
        return tonumber(ngx.var.myothervar)-1
    }

closes: vim/vim#19362

e92998ea4d

Co-authored-by: Josef Schönberger <josef.schoenberger@tum.de>
2026-02-10 06:42:35 +08:00
Starman
4b2cbc2154 build(desktop): declare "Development" category #37794 2026-02-09 16:55:37 -05:00
phanium
9f77124b78 fix(lsp): error on omnifunc completion (#37790)
Problem:
After eaacdc9, complete with emmylua_ls error with:
runtime/lua/vim/lsp/completion.lua:586: attempt to get length of field
'items' (a nil value)

Solution:
Result can be CompletionItem[] according the spec:
> If a `CompletionItem[]` is provided, it is interpreted to be complete,
> so it is the same as `{ isIncomplete: false, items }`
2026-02-09 09:45:21 -08:00
Yochem van Rosmalen
1ee166a64d docs(quickfix): fix tag format for CTRL mappings #37793
Problem:
Mappings with a control modifier follow the (tag) format of:

	{key_before}_CTRL-{key}_{key_after}

Where `{key_before}` and `{key_after}` can be any other key combination.
However, for the Nvim default mappings `[_CTRL-Q`, `]_CTRL-Q`,
`[_CTRL-L`, `]_CTRL-L`, `[_CTRL-T` and `]_CTRL-T`, the underscore
between the bracket and CTRL was absent. This lead to problems finding
the relevant docs with `:help [_CTRL-Q` and made parsing the {subject}
argument for `:help` harder.

Solution:
Use the right tag format.
2026-02-09 12:13:24 -05:00
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