Commit Graph

10311 Commits

Author SHA1 Message Date
Justin M. Keyes
b8a976afda docs: api, messages, lsp, trust
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the
"Experimental" warning for prerelease features.
2026-03-11 18:00:18 +01:00
Justin M. Keyes
4aeeaa8027 docs: usr_25.txt formatting
fix https://github.com/neovim/neovim.github.io/issues/453
2026-03-11 12:39:49 +01:00
glepnir
63594ffa04 feat(lsp): do completionItem/resolve if completeopt=popup #32820
Problem:
No completionItem/resolve handler.

Solution:
If completeopt=popup is set, invoke completionItem/resolve when
a completion item is selected. Show resolved documentation in popup next
to the completion menu.
2026-03-11 05:48:31 -04:00
zeertzjq
ddccf882ff vim-patch:c6f6f16: runtime(toml): update syntax script and fix highlight of dates and escapes (#38239)
From upstream:
https://github.com/cespare/vim-toml/pull/69
https://github.com/cespare/vim-toml/pull/70

closes: vim/vim#19591

c6f6f1602d

Co-authored-by: Martin Tournoij <martin@arp242.net>
2026-03-11 08:16:14 +08:00
Justin M. Keyes
2c5266429c Merge #37926 msg_show UI event indicates user-interactive 2026-03-10 17:53:11 -04:00
MP430
b3324be0d8 fix(man.lua): :Man ignores section of gzipped manpage #38235
Problem:
Under certain circumstances (e.g. gzipped manpages with mandoc),
:Man will not find the correct page because it does not process
multiple extensions correctly.
For example, with a file named strcpy.3p.gz, it will only check the .gz
part to try to check the section.
This leads to some pages being inaccessible because it will return the
page from the wrong section.

Solution:
Loop and try multiple extensions to try to find one which matches
the name of the section.
Also refactor the man.get_path function so that it can be tested.
2026-03-10 17:26:40 -04:00
glepnir
145548a24a feat(lsp): show snippet preview if completeopt=popup #32553
Problem:
LSP completion does not show snippet preview.

Solution:
Show snippet preview if 'completeopt' includes popup.
2026-03-10 14:34:58 -04:00
Ayaan
c8693051a8 feat(terminal): surface exit code via virttext + nvim_get_chan_info #37987
Problem:
When a terminal process exits, "[Process Exited]" text is added
to the buffer contents.

Solution:
- Return `exitcode` field from `nvim_get_chan_info`.
- Show it in the default 'statusline'.
- Show exitcode as virtual text in the terminal buffer.
2026-03-10 08:02:50 -04:00
Yi Ming
0cc4f53b40 fix(lsp): do not clear the codelens on the last line #38226
Problem
The logic that clears codelenses beyond the buffer also removes the codelenses on the last line.

Solution
Do not clear the codelens on the last line.
2026-03-10 07:36:29 -04:00
Stefan Novaković
bffca6e26b feat(extmark): support end_col=-1 if strict=false #28169
Problem:
There is an inconsistency between extmarks/highlights regarding the
`end_col` param.

Solution:
Allow end_col=-1 to mean "end of line" (if strict=false).

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-03-09 19:20:25 -04:00
Justin M. Keyes
dce8bdd247 Merge #38117 from noib3/fix-lua-lints-in-src 2026-03-09 18:16:01 -04:00
Riccardo Mazzarini
7fdf9f7399 fix: define vim.mpack
We define vim.mpack so that LuaLS doesn't emit undefined-field warnings
when using it, annotated with @nodoc to skip doc generation.
2026-03-09 21:47:13 +01:00
Justin M. Keyes
de4f4dc807 Merge #37985 fix(lsp): adjust codelens position by range, ensure first-line visibility 2026-03-09 14:48:30 -04:00
Evgeni Chasnovski
47dedb55fc docs(pack): simpify update() docs, fix directory path #38194
Problem: Documentation of `vim.pack.update()` contains a lot of text
 inside nested list. This might be a bit confusing to parse for humans
 and definitely confusing to parse for neovim.io.

 The description of `vim.pack` directory is not correct for Windows.

Solution: Move description of confirmation buffer in a separate
  "subsection".

  Use '"data" standard path' instead of '$XDG_DATA_HOME/nvim' when
  documenting directory. Also use `|standard-path|` tag to link to
  standard path section instead of `|stdpath()|`.
2026-03-09 12:49:01 -04:00
Yi Ming
d53d542359 fix(lsp): stop and close timer when Capability is destroyed 2026-03-09 11:40:08 +00:00
zeertzjq
60b997b71d vim-patch:2c1269f: runtime(zip): Make ZipUpdatePS() check that shell is powershell (#38204)
fixes: vim/vim#19576

2c1269f0d3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-09 07:44:04 +08:00
altermo
72d3a57f27 feat(treesitter): incremental selection
Co-authored-by: György Andorka <gyorgy.andorka@protonmail.com>
2026-03-08 11:07:49 +01:00
Yi Ming
40dc2d02a8 fix(lsp): ensure the codelens on the first line is visible 2026-03-08 11:32:50 +08:00
Yi Ming
378435968f fix(lsp): adjust codelens position based on the server-provided range 2026-03-08 10:42:38 +08:00
Christian Clason
908591c61c refactor(lua): adapt to Stylua 2.4.0 2026-03-07 18:23:35 +01:00
zeertzjq
60389e1c0e vim-patch:e948fea: runtime(sed): Update syntax, support more GNU address extensions (#38193)
- Support all GNU address extensions.
- Fix some bugs related to erroneous matching of pattern delimiters in
  bracket expressions.

closes: vim/vim#19587

e948fea640

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-03-07 19:02:29 +08:00
Stefan VanBuren
d8e03d5d5a fix(treesitter): escape hyphen in lua pattern
Ref: https://github.com/neovim/neovim/pull/38140#discussion_r2897235978
2026-03-07 11:08:34 +01:00
luukvbaal
b6c020eb59 fix(ui2): ensure expanded cmdline is closed after :<Esc> (#38187)
Problem:  Expanded cmdline is left open after entering the cmdline again
          without entering a command that emits another message (after 301c7065).
Solution: Wait for msg_show to reinstate the vim.on_key() handler.
          If there was no message close the expanded cmdline.
2026-03-07 00:40:01 +00:00
Marc Jakobi
34a59e30db docs(api): clarify nvim_win_set_buf documentation #37201 2026-03-06 13:34:47 -05:00
luukvbaal
301c7065ca fix(ui2): only highlight Ex command lines in the cmdline #38182
Problem:  Prompts and message text (in block mode) in the cmdline are
          parsed and highlighted as if it is Vimscript.
          Entering the cmdline while it is expanded can work more like
          it does with UI1, where the press enter prompt is replaced
          and previous messages stay on the message grid, while
          subsequent messages are placed below it.
Solution: Highlight manually with string parser on lines starting with ':'.
          Spoof cmdline block mode when the cmdline is entered while it
          is expanded.
2026-03-06 13:29:20 -05:00
luukvbaal
6275f533d1 fix(ui2): immediately open target windows on new tabpage (#38170)
Problem:  Previous tests for this relied on other events opening the
          targets, which are not guaranteed to happen.
Solution: Open target windows when entering a new tabpage.
2026-03-06 17:32:17 +01:00
glepnir
bfc7bae421 fix(health): improve version check for nightly builds #38147
Problem: nightly builds were always compared against HEAD, causing
false outdated warnings.

Solution: fetch both HEAD and refs/tags/nightly, match local commit
against HEAD first, fall back to nightly if no match.

Fix #38141
2026-03-06 07:58:42 +00:00
zeertzjq
2926668f29 vim-patch:75decb4: runtime(glimmer): add syntax support for glimmer files
In commit cdf717283 ("patch 8.2.4424: ".gts" and ".gjs" files are not
recognized", 2022-02-19) support for the glimmer file types were added.

Problem:  Syntax hilighting suppoprt was missing.
Solution: Added a glimmer syntax file that will leverage the base
          syntaxs (javascript/typescript) and include handlebars syntax
          for .gjs/.gts files.

closes: vim/vim#19569

75decb4a8d

Co-authored-by: Devin Weaver <suki@tritarget.org>
2026-03-06 07:59:43 +08:00
zeertzjq
aa9ab2e728 vim-patch:99ea2b5: runtime(handlebars): adds handlebars template syntax & indent support
The runtime had support to detect handlebars (*.hbs) files as filetype
handlebars but was lacking any indent or syntax highlighting for that
filetype.

The handlebars syntax file is also a prerequisite for the glimmer
syntax.

Permission was granted by the original author to retrofit these into the
Vim runtime. Original License (MIT) maintained in code comments.

related: vim/vim#19569

99ea2b5b06

Co-authored-by: Devin Weaver <suki@tritarget.org>
2026-03-06 07:59:15 +08:00
Maria Solano
7a8d316879 fix(lsp): update metamodel (#38174) 2026-03-05 15:15:29 -08:00
Lewis Russell
8bfb91accc fix(lsp): ignore stale codelens resolve responses (#38153) 2026-03-04 17:43:40 -08:00
zeertzjq
16fbde83c4 fix(checkhealth): don't wrap command in cmd.exe (#38158)
This was introduced in #6608 and is unnecessary since #9516 and #31109.
2026-03-05 07:51:24 +08:00
Stefan VanBuren
01817eb6f3 fix(treesitter): normalize language aliases
Hyphenated language names are silently dropped when used as injections
(see #38132).

This combines the normalization of language aliases into `resolve_lang`,
and also adds the normalization of hyphens to underscores, which allows
for handling of injected language tags with hyphens in their names.

Fixes #38132.
2026-03-04 17:15:59 +01:00
Luuk van Baal
875212c5b3 feat(ui2): support routing "typed_cmd" trigger to target
Problem:  Unable to immediately open a typed command in the pager.
Solution: Support mapping msg_show "typed_cmd" trigger in
          cfg.msg.targets (e.g. `targets = { typed_cmd = 'pager' }`).
2026-03-04 15:07:38 +01:00
zeertzjq
813457d5a6 build: adjust parallel functionaltest target names (#38144)
- Use double underscores for the group targets as these targets usually
  shouldn't be used directly.
- Use dash instead of underscore in the two targets that need to be used
  directly. I'm not entirely sure about this, as both chars are used in
  many targets, but a dash is easier to type than an underscore.
2026-03-04 08:53:20 +08:00
Evgeni Chasnovski
f00abc6a56 fix(pack): ensure data spec is passed in events during lockfile sync #38139
Problem: During initial "bootstrap" via lockfile synchronization, the
  whole plugin specification is reconstructed from the lockfile data,
  ignoring potential user changes added in the first `vim.pack.add()`.
  This is enough in most situations since it is the only data needed
  for actual installation.

  However, this affects specification passed to `PackChanged[Pre]`
  events. In particular, `data` field is missing which can be a problem
  if there is a `PackChanged kind=install` hook that uses that field
  (like with some kind of `build` method used during install).
  And there might be different `version` set in `vim.pack.add()`.

Solution: Pass the `specs` input of the first `vim.pack.add()` down to
  lockfile synchronization and use it to reconstruct plugin
  specification for the to-be-installed plugin. If present among the
  user's `specs`, it is used but with forced `src` from the lockfile (as
  it is the one used during installation).

  Note that this still has a caveat when using separate
  `vim.pack.add()`, as only the specs from the first input (when the
  lockfile synchronization happens) is taken into account.
2026-03-03 19:16:24 -05:00
Luuk van Baal
97549ad7cf feat(ui): specify whether msg_show event comes from typed command
Problem:  Unable to tell whether a msg_show event is emitted as a result
          a command typed on the cmdline (UI may want to represent these
          differently from other messages).
Solution: Add trigger parameter that is set to "typed_cmd" for
          a message emitted due to an interactively typed command.
          Possible extensions are mapping/timer/event but it's hard to
          imagine a UI distinguishing those so not added here.
2026-03-03 18:05:42 +01:00
Sean Dewar
1901832f26 fix(api): return "style" in nvim_win_get_config() #38122
Problem: nvim_win_get_config() does not return a window's "style".

Solution: always include it, and document `style=""`.

Always included so it can be used reciprocally with nvim_open_win() or
nvim_win_set_config(). (otherwise the config of a window with kWinStyleUnused
will not unset the kWinStyleMinimal style of another window if passed to
nvim_win_set_config, for example)
2026-03-03 12:17:20 +00:00
zeertzjq
b4274b73f3 vim-patch:99ba87d: runtime(nickel): Add filetype plugin with com, cms settings (#38134)
closes: vim/vim#19545

99ba87d152

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2026-03-03 09:36:15 +08:00
zeertzjq
f1c57b39fd vim-patch:73f4162: runtime(doc): Tweak doc style in options.txt
73f41626df

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-03-03 08:24:15 +08:00
zeertzjq
3e81072293 vim-patch:9.2.0088: cannot display tabs for indentation
Problem:  cannot display tabs for indentation
Solution: Add the "leadtab" value to the 'listchars' option to
          distinguish between tabs used for indentation and tabs used
          for alignment (HarshK97).

closes: vim/vim#19094

8526d32647

Co-authored-by: HarshK97 <harshkapse1234@gmail.com>
2026-03-03 08:05:58 +08:00
Sergei Slipchenko
a8361c3afc docs(diagnostics): use the original namespace in "on-jump" example (#38124)
Problem: currently in the example a new diagnostic namespace is created
for showing it manually with a custom config. Because of a separate
namespace, when the original diagnostic source sets diagnostics again,
it will not affect the diagnostic shown in that new namespace and the
user would need to implement the logic for hiding it themselves,
separately as well.

Solution: instead of creating a new namespace, reuse the original
diagnostic's namespace, so once the source sets diagnostics again, it's
removed and hidden automatically without user having to do anything
extra for that.
2026-03-02 09:51:31 -08:00
zeertzjq
ab8371a26c fix(tui): server --listen error sometimes not visible (#38027)
Problem:  If Nvim server fails to --listen and prints error before the
          TUI enters alternate screen, the error isn't visible.
Solution: Forward server stderr using client side stderr handler instead
          of having the server inherit client stderr file descriptor.

This does mean that `stderr_isatty` will be `false` in the server, but
that value doesn't matter in embedded mode.

Always pass `stdin_fd` to embedded server to avoid a hang when reading
from stdin when it's a TTY (not sure why one wants to do that, perhaps
by mistake), because if `stdin_fd` isn't passed, the server will try to
use stderr as stdin.

Example test failure on CI:

FAILED   test/functional/terminal/tui_spec.lua @ 41: TUI exit status 1 and error message with server --listen error #34365
test/functional/terminal\tui_spec.lua:55: Failed to match any screen lines.
Expected (anywhere): "nvim%.exe: Failed to %-%-listen: address already in use:"
Actual:
  |{114:nvim.exe -h"}                                                |
  |                                                            |
  |[Process exited 1]^                                          |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |{5:-- TERMINAL --}                                              |

Snapshot:
screen:expect([[
  {114:nvim.exe -h"}                                                |
                                                              |
  [Process exited 1]^                                          |
                                                              |*13
  {5:-- TERMINAL --}                                              |
]])

stack traceback:
	test\functional\ui\screen.lua:909: in function '_wait'
	test\functional\ui\screen.lua:537: in function 'expect'
	test/functional/terminal\tui_spec.lua:55: in function <test/functional/terminal\tui_spec.lua:41>

In this case, it appears that the client entered alternate screen in the
middle of the server's print_mainerr().
2026-03-02 20:39:05 +08:00
zeertzjq
dea8430d59 test: suppress DSR wait warning when running tests (#38126)
Problem:
The DSR wait warning causes any test that involves Nvim TUI to become
flaky on Windows. Example:

FAILED   test/functional/terminal/cursor_spec.lua @ 367: :terminal cursor can be positioned arbitrarily
test/functional/terminal\cursor_spec.lua:377: Row 1 did not match.
Expected:
  |*^                                                  |
  |*~                                                 |
  |*~                                                 |
  |*~                                                 |
  |*~                                                 |
  |*                                                  |
  |{5:-- TERMINAL --}                                    |
Actual:
  |*                                                  |
  |*                                                  |
  |*{2:                                                  }|
  |*{103:defaults.lua: Did not detect DSR response from ter}|
  |*{103:minal. This results in a slower startup time.     }|
  |*{UNEXPECTED foreground = tonumber('0x000006'):Press ENTER or type command to continue^           }|
  |{5:-- TERMINAL --}                                    |

Solution:
Don't show the DSR wait warning when running tests.
2026-03-02 20:34:11 +08:00
zeertzjq
1a02896e16 vim-patch:14eddc7: runtime(xkb): Include a simple xkb ftplugin (#38121)
Problem:  There is a xkb syntax, but no filetype plugin.
Solution: Create a filetype plugin and set the comment and commentstring
          options for the xkb filetype (xkb = X keyboard extension)

closes: vim/vim#19537

14eddc7d46

Co-authored-by: GX <59413576+gx089@users.noreply.github.com>
2026-03-02 00:43:54 +00:00
zeertzjq
62135f5a57 vim-patch:b901fa9: runtime(vim): Update base syntax, improve :syntax group list arg matching (#38112)
Attempt to match all variations of group name and comma separator across
continuation lines.

Fixes issues:
- vim/vim#18491 (Two ")"s are incorrectly colored 'vimOperError' in
  syntax/mail.vim), reported by @lkintact
- vim/vim#19366 (highlight error for contains elements in a new line), reported
  by Maxim Kim

fixes: vim/vim#18491
fixes: vim/vim#19366

b901fa9a6a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-03-01 08:13:19 +08:00
Christian Clason
8a79e3398a vim-patch:75c291f: runtime(julia): Update julia ftplugin
commentstring changed to single line variant in
JuliaEditorSupport/julia-vim@edd3512

closes: vim/vim#19530

75c291fc39

Co-authored-by: Daniel Wennberg <daniel.wennberg@gmail.com>
2026-02-28 23:59:52 +01:00
Tomas Slusny
45b4bbac28 feat(difftool): replace old "nvim -d" automatically #38057
Problem:
"nvim -d" doesn't leverage nvim.difftool.

Solution:
If nvim.difftool was enabled via :packadd, automatically
handle "nvim -d" on startup.

    nvim -c "packadd nvim.difftool" -d dir1/ dir2/
2026-02-28 11:03:44 -05:00
glepnir
3e8a4e1092 feat(lsp): show color preview in completion items #32138
Problem: Color completion items display as plain text without visual preview

Solution: Parse RGB/hex colors from documentation and render with colored symbol ■
2026-02-28 10:02:52 -05:00
Nicknamess96
c1e60f36f3 fix(difftool): don't reset quickfix list when closing quickfix window #38088
Closing the quickfix window previously triggered a WinClosed autocmd
that deleted all difftool autocmds and pushed an empty quickfix list,
making the difftool non-functional. Users who close the quickfix window
to gain screen real estate for viewing diffs had no way to continue
navigating entries.

Remove the qf_win tracking and its associated WinClosed autocmd so that
closing the quickfix window no longer tears down the difftool state.
Closing either diff window still performs full cleanup as before.

The BufWinEnter handler no longer passes with_qf to diff_files, so
navigating entries while the quickfix window is closed reuses the
existing diff layout without forcing a layout rebuild.

Fixes #37388
2026-02-28 09:59:53 -05:00