853 Commits

Author SHA1 Message Date
Barrett Ruth
3b88a8a65d fix(filetype): ensure directory bufname ends w/ slash sep #40552
Problem:
`vim.filetype.match()` needs a cheap way to recognize directory buffers
without doing filesystem stat work.

Solution:
Ensure full buffer names for directories end in a trailing slash. Now
directory buffers can proceed through the normal 'filetype' path.

Note side-effects: session and ShaDa buffer-list restore behavior must
be compatible, so those + corresponding tests must be updated.
2026-07-10 12:40:13 -04:00
Evgeni Chasnovski
0653e7a338 feat(pack): 'packlockfile' option #40562
Problem: No way to configure the lockfile location.

Solution: Add 'packlockfile' option.
2026-07-08 12:23:28 -04:00
Barrett Ruth
cfd7f29d52 feat(vim.fs): vim.fs.mkdir() #40599
Problem:
`vim.fs` does not provide a directory creation helper matching its
filesystem API shape.

Solution:
Add `vim.fs.mkdir()` as a thin wrapper around `vim.fn.mkdir()`, with
`parents` and `mode` options.
2026-07-08 07:16:29 -04:00
Justin M. Keyes
8dfe4d6629 fix(api): nvim_win_resize tweaks #40596 2026-07-05 13:22:16 -04:00
Justin M. Keyes
a0fd59352a Merge #40520 nvim_win_resize 2026-07-05 12:06:13 -04:00
XiaowenHu96
ce718e31f4 feat(api): add nvim_win_resize()
Ref #6645

Problem:
When a window is resized it takes space from the window right/below first,
and only falls back to the window left/above when there is no more room.
Sometimes a user wants the space to come from a specific direction.

Solution:
Add nvim_win_resize(win, width, height, {anchor}) which resizes a window
with a choosable anchor edge, letting a window grow leftwards or upwards
by taking space from the window to the left or above first. The default
anchor reproduces nvim_win_set_width()/nvim_win_set_height().
2026-07-05 21:47:34 +08:00
Barrett Ruth
d0a262db88 feat(channel): add ChanClose event #40568
Problem:
Plugins using RPC sockets cannot detect when the peer closes a
`sockconnect()` channel, so reconnect logic has no reliable trigger.

Solution:
Add a `ChanClose` event with channel info before the channel is removed,
matching the existing `ChanOpen`/`ChanInfo` event model.
2026-07-04 15:21:25 -04:00
Justin M. Keyes
34efdadb4e feat(health): report ulimit info
Problem:
Nvim shows `(libuv) kqueue(): Too many open files` on macos.
ref https://github.com/neovim/neovim/issues/40238

Solution:
Add a healthcheck for this situation.
2026-07-01 13:26:21 +02:00
Justin M. Keyes
d2073d2eec refactor: cleanup, docs #40480 2026-06-29 13:10:31 -04:00
Nathan Zeng
845b66dd4a feat(:restart)!: ":restart" (no bang) saves/restores session #40321
Problem:
`:restart` does not preserve window layout, etc.

Solution:
- Change `:restart` to save/restore a session automatically.
- Introduce "bang" variant `:restart!` to restart *without* session
  save/restore.
- Introduce `v:startreason`.
- `ZR` maps to `:restart!`.
2026-06-29 10:55:23 -04:00
Kyle
f34ee3da80 feat(api): nvim_set_option_value(operation=...) #39849
Problem:
`nvim_set_option_value` cannot "update" options similar to `:set opt=`,
`:set opt+=`, etc. The Lua impls of "vim.opt" / "vim.o" have incomplete,
bespoke reimplementations of those operations.

ref #38420

Solution:
- Add `operation` param to `nvim_set_option_value`, which may be "set",
  "append", "prepend", or "remove".
- Use this feature to implement `vim.opt` / `vim.o`.
2026-06-28 13:20:56 -04:00
Sébastien Hoffmann
444d0b8b6c feat(statusline)!: allow %= in item groups, scope %< to item groups #40369
Problem: Separation markers (%=) are ignored within item groups. This
lead to a regression when the C implementation of the statusline was
replaced with a default expression. When the user configured a custom
ruler expression with a %= and used the overloaded item group syntax to
set the ruler width, the separation marker worked in the ruler, but not
when the ruler was incorporated into the statusline where the item group
syntax was interpreted in the usual way.

Solution: Analogously to top-level behaviour, expand separation markers
evenly within item groups until `minwid` is reached (if set).

ref https://github.com/neovim/neovim/pull/33036
fix https://github.com/neovim/neovim/issues/39984
ref https://github.com/neovim/neovim/issues/40247

Problem: The recursion offset into the static `stl_items` was not taken
into account when adjusting the item count after truncation.

Steps to reproduce: first prepare `stl_items`:
  set stl=%{%repeat('%#Error#',10)%}
then watch how the Error highlight leaks into the recursive call:
  set stl=%l%l%l%{%nvim_eval_statusline('test%l%<',{'maxwidth':3,'highlights':1}).highlights%}

ref https://github.com/neovim/neovim/issues/32259

* fix(statusline): consistent truncation at multicell character

Problem 1: truncation of item groups at multicell character didn't take
into account that minwid can be specified as a negative number.

Problem 2: after truncation at top-level from the right at multicell
character, the returned width was always `maxwidth`, even though the
actual width was reduced. In vim, this can be observed as a statusline
that is not fully drawn until the edge of the screen:
  vim --clean +"set ls=2 stl=%{%repeat('x',&columns-2)%}🙂x%<"

Problem 3: after truncation at top-level from the left at multicell
character, the resulting gap to reach `maxwidth` again was filled with
fillchars, but then the final NUL was not set correctly.
This can be seen in the following example, where the statuscolumn spills
into the editing area starting from line 10:
  nvim --clean +"set number stc=%<x🙂%{repeat('x',43)}%l" +"norm yy10p"

Solution: fix the small errors and, at top-level, consistently reduce
the size instead of compensating with fillchars. In the case of the
statusline and the winbar, the remaining place is filled with the
configured fillchars in `win_redr_custom`, after `build_stl_str_hl` has
returned. In all other cases (title, icon, statuscol, tabline, ruler),
there seems to be no point in adding additional spaces at the end.

* feat(statusline)!: scope %< to item groups

Problem:
Previously, item groups were only truncated at the beginning, which is
often not desired. In the example
  %.15(path: %f%)
the group's title/label is truncated away:
  <th/to/file.txt
Truncation markers (%<) in item groups were processed at the top-level
in the end, which can be confusing. Only the first %< is used for the
whole string, and it is used even if the containing item group is
hidden. Additionally, in the case of hidden item groups, the marker's
position was not adapted. For example,
  %(hidden%<%)%f
had the effect of truncating the path somewhere in the middle:
  /path/<file.txt

Solution:
Make truncation consistent with top-level behaviour, which has a better
default of truncating at the first `Normal` item, i.e.
  path: <file.txt
and allows for fine-grained control with truncation markers (%<). E.g.
  %.15(path: %f%<%)
now yields
  path: /path/to>
The original behaviour can be restored like so:
  %.15(%<path: %f%)

BREAKING CHANGE: %< is no longer processed at top-level
- the default truncation behaviour has changed: now at first item
- truncation markers inside item groups don't affect truncation outside
  of the item group anymore
- several truncation markers can now have an effect when separated with
  item groups, whereas previously only the first one globally had

ref https://github.com/neovim/neovim/issues/39984
2026-06-27 11:10:05 -04:00
Justin M. Keyes
b2bf7bcfb1 feat(cmdwin): implement cmdwin as a normal buf+win
Problem:

cmdwin (the `:q` cmdline buffer) has various limitations which require
special-casing all over the codebase.

Besides complicating the code, it also breaks async plugins if they try
to create buffers/windows after some work is done, if the user happens
to open cmdwin at the wrong the moment:

    Lua callback: …/guh.nvim/lua/guh/util.lua:531:
    E11: Invalid in command-line window; <CR> executes, CTRL-C quits
    stack traceback:
        [C]: in function 'nvim_buf_delete'
        …/guh.nvim/lua/guh/util.lua:531: in function <…/guh.nvim/lua/guh/util.lua:526>

Solution:

Just say no to "inception". Reimplement cmdwin as a normal buffer+window.

All of the cmdwin contortions (in both core, and innocent plugins) exist
literally only to support "inception": recursive
cmdwin-in-cmdline-things, like `<c-r>=`, `/`, search-during-substitute,
`:input()`, etc. So we just won't support that (though I have
a potential plan for that later, which I call "modal parking lot").

The benefit is that plugins, and core, no longer have to care about
cmdwin.

BONUS:
- mouse-drag on vertical separators works (it only worked for
  horizontal/statusline before)
- inccommand-in-cmdwin now works correctly, for free (thus don't need
  #40077).

POTENTIAL FOLLOWUPS
- Drop `CHECK_CMDWIN` ("E11: Invalid in command-line window"), allow chaos.
- Unify `BUFLOCK_OK` / `LOCK_OK` ?

DESIGN:
- Eliminate lots of C globals, `EX_CMDWIN`, etc.
- `text_locked()` no longer reports true for cmdwin.
- cmdwin = a normal window with 'winfixbuf', 'bufhidden=wipe',
  'buftype=nofile'. Invariants come from those options rather than
  special cases throughout the codebase.
- `nv_record` for q:/q//q? calls Lua
  `nlua_call_vimfn("vim._core.cmdwin", …)`. No `K_CMDWIN`
  / cmdline-reader detour.
- `cedit_key` (`c_CTRL-F`) schedules a deferred event that calls
  `vim._core.cmdwin.open(type, content, pos)` and returns `Ctrl_C` so
  the in-flight cmdline cancels. Reader state is not serialized; instead
  the captured `(type, line, col)` is replayed via
  `nvim_feedkeys(type..line.."<CR>", "nt", …)` after user confirms.
- On confirm/cancel: `<CR>` / `<C-C>` calls into Lua which closes the
  window and re-feeds the cmdline.

BREAKING CHANGES:
- Expression-register cmdline (`<C-R>=` from insert-mode) no longer
  supports cmdwin. Same applies to `input()` / `inputlist()` (already
  covered by `text_locked`).
- Usage of cmdwin in macros/mappings will probably break (assuming they
  ever worked).
2026-06-25 18:36:24 +02:00
Justin M. Keyes
8e3b216d0b docs: bufadd(), fnameescape() guidance #40378 2026-06-23 10:08:50 -04:00
Barrett Ruth
db30608058 fix(tui): attribute TermResponse to source channel #40330
Problem: Attach-time terminal probes cannot distinguish responses from
different attached UIs.

Solution: Identify the UI by RPC channel id in `TermResponse` and make
`vim.tty.request()` filter responses by channel.
2026-06-23 06:19:56 -04:00
Barrett Ruth
74f163c67d fix(defaults): detect 'background'/'termguicolors' on UI attach #40175
Problem:  Terminal background and truecolor detection runs only at startup,
          gated on a UI being attached. A headless server has no UI then, so
          `'background'` and `'termguicolors'` are never detected and remote
          UIs ignore the terminal's theme.
Solution: Also (re)detect on UIEnter. The most recently attached terminal
          wins; an explicit user value is preserved.
2026-06-20 20:09:34 -04:00
luukvbaal
69160854c5 feat(column): per row click handlers for 'statuscolumn' (#40265)
Problem:
- Current 'statuscolumn' click label caveat is restrictive.
- v:virtnum is not unique to a line if it has both above and
  below virtual lines.
- 'statuscolumn' click handler may expect v:virt/lnum to be set.

Solution:
- Store per-row click definitions for the statuscolumn in a
  (nested line/virt number) map.
- Implement strategy that gives each 'statuscolumn' row a unique
  v:virtnum.
- Set v:virt/lnum when determining which line is clicked.
2026-06-20 15:59:08 +02:00
Nathan Zeng
ae426ee465 feat(:restart): v:startreason #40186
Problem:
It's clumsy for scripts to handle a "restart", without custom mappings or
global vars.

Solution:
Introduce `v:startreason`
2026-06-18 15:49:12 -04:00
glepnir
724e1421f8 fix(api): keep highlight font through set/get and redraws #40200
Problem: a font set via nvim_set_hl is lost or corrupted with font-only groups,
attribute combining, and update=true, and is dropped on any attr-table rebuild.
nvim__inspect_cell also frees the font name while a returned dict still borrows it.

Solution: register font-only groups, carry font through hl_combine_attr, inherit
it on update, and persist sg_font so a rebuild can restore it. Keep interned font
names across a rebuild instead of clearing them. Add the missing font field to
get_hl_info.

Co-authored-by: Ryan Patterson <cgamesplay@cgamesplay.com>
2026-06-15 17:51:42 -04:00
Igor Lacerda
8b5d80ab44 feat(events): :mksession SessionWritePre event #39688
Problem:
No event triggered just before writing a session file.

Solution:
Add `SessionWritePre`.
2026-06-14 17:04:46 -04:00
glepnir
2e8c60cb38 vim-patch:9.2.0624: C-N/C-P cannot be mapped in complete() completion (#40232)
Problem:  Keys valid in CTRL-X mode are never mapped while insert
          completion is active, so <C-N> and <C-P> cannot be remapped
          for completion started by complete().
Solution: Do not disable mappings in CTRL_X_EVAL mode.  In this mode a
          mapping cannot interfere with selecting the completion
          method, which is what the no-mapping rule exists for.

related: vim/vim#6440
related: vim/vim#16880
closes:  vim/vim#20489

076585e6ad

Co-authored-by: Thomas M Kehrenberg <tmke8@posteo.net>
2026-06-14 05:15:07 +00:00
Justin M. Keyes
1d33a81751 test(autoread): cleanup
- Merged into the main "reloads on external change" test.
- Reduce duplication.
- Wall-clock down from ~4.4s to ~1.4s (dropped 3s debounce test).
2026-06-13 20:54:00 +02:00
Oleksandr Chekhovskyi
400f247397 feat(autoread): use filewatchers for OS-driven change detection #37971
Problem:
The 'autoread' option only checks for file changes reactively — on
FocusGained, :checktime, CmdlineEnter, etc. — by polling timestamps.
External changes are not detected until the user interacts with Neovim.

Solution:
Add a core module (runtime/lua/nvim/autoread.lua) enabled from
runtime/plugin/autoread.lua that watches each buffer's file using
vim._watch.watch() (libuv fs_event). On change detection it calls
:checktime, which invokes the existing buf_check_timestamp() logic
for reload/prompt handling. Watchers are managed via autocmds tied
to buffer lifecycle events and respect the 'autoread' option (global
and buffer-local).
2026-06-12 18:25:15 -04:00
Justin M. Keyes
a6584b205c docs: misc 2026-06-11 13:35:19 +02:00
tao
b49492f13c fix(option): set 'shell…' options based on detected shell #40031
Problem:
* 'shellcmdflag' states that its default value is set according to the
  value of 'shell', but this behavior is not yet implemented on Windows.
  The same applies to 'shellpipe', 'shellredir', and 'shellxquote'.
* On Windows, Git is often installed in paths containing spaces, and we
  still do not correctly resolve the sh executable name as described in
  'shell'.
* On Windows, the default value of 'shellslash' is always `false`,
  which causes Unix-like shells to interpret `\` in paths returned by
  some functions as escape charaters.

Solution:
Use a simple rule table to detect common shells (e.g. `cmd`,
`powershell`, shells whose names contain `csh` or `sh`) and apply
best-effort defaults, while leaving more complex scenarios to user
configuration.
2026-06-10 17:28:17 -04:00
zeertzjq
268cd370be vim-patch:595d0a7: runtime(doc): wrong {str} length limit in matchfuzzy() docs (#40157)
Problem:  docs say {str} is capped at 256 and longer returns an empty list.
Solution: it's 1024, and {str} plus each candidate are just truncated to
          that, not rejected; fix the text.

closes: vim/vim#20453

595d0a77e4

Co-authored-by: glepnir <glephunter@gmail.com>
2026-06-10 01:18:26 +00:00
Justin M. Keyes
8f584031bc docs: misc #40126 2026-06-08 16:12:14 -04:00
jreidx
d9aa06eed8 feat(extmark): virt_lines_overflow "wrap" and "auto"
Problem: Extmark has support for horizontal scrolling and truncating, but not wrapping.

Solution: Extend virt_lines_overflow flags to support "wrap" and "auto" based on proposed changes in #18282.
2026-06-08 22:19:25 +08:00
zeertzjq
4ab670399b vim-patch:9.2.0596: cmdline completion popup cannot be scrolled with the mouse (#40142)
Problem:  In command-line completion with a popup menu ('wildoptions'
          contains "pum"), the info popup shown next to the menu could
          not be scrolled, unlike the Insert mode completion info popup
          which scrolls with the mouse wheel.
Solution: When the mouse pointer is on top of the info popup, scroll it
          with the mouse wheel in command-line mode as well, without
          closing the completion popup menu.

closes: vim/vim#20146
closes: vim/vim#20418

96dbab257a

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 20:53:10 +08:00
glepnir
11b9e6f193 fix(option): allow empty/blank edges in 'winborder' #40112
Problem:
The comma form of 'winborder' is split with copy_option_part(),
whose skip_to_option_part() eats spaces after a comma, and empty
fields are rejected.

Solution:
Split the comma form literally on ',', keeping empty fields and
single-space fields.
2026-06-05 06:37:07 -04:00
Justin M. Keyes
cbadc4f164 docs: misc, lsp
Problem:
This doc on `vim.lsp.completion.get()`:

    --- Used by the default LSP |omnicompletion| provider |vim.lsp.omnifunc()|, thus |i_CTRL-X_CTRL-O|
    --- invokes this in LSP-enabled buffers. Use CTRL-Y to select an item from the completion menu.
    --- |complete_CTRL-Y|

...makes two wrong claims:

1. "Used by the default LSP omnicompletion provider vim.lsp.omnifunc()"
    - `_omnifunc` does not call `M.get()`, it calls the internal `trigger()` directly.
2. "thus |i_CTRL-X_CTRL-O| invokes this in LSP-enabled buffers"
    - The two paths use different client sets:
        - `M.get()` reads `buf_handles[bufnr].clients` (clients
          explicitly registered via `vim.lsp.completion.enable(true, ...)`).
        - `_omnifunc` reads `lsp.get_clients({method='textDocument/completion'})` (every
          completion client, regardless of `enable()`).

Solution:
Update docs.

Co-authored-by: Koichi Shiraishi <zchee.io@gmail.com>
Co-authored-by: y9san9 / Alex Sokol <y9san9@gmail.com>
Co-authored-by: adv0r <>
2026-06-03 12:27:30 +02:00
Justin M. Keyes
70f8c7bbf3 Merge #40057 from luukvbaal/hidenodraw
perf(redraw): don't redraw hidden windows
2026-06-02 08:51:08 -04:00
zeertzjq
edcaf1887a vim-patch:partial:9.2.0573: Vim9: missing EX_WHOLE on some block keywords (#40071)
Problem:  Several Vim9 keywords lack EX_WHOLE and can be shortened in
          Vim9 script, inconsistent with endif/enddef/endfor/endwhile/
          endtry which already have it.  The error from :endd in a
          nested function also hardcodes "enddef" instead of reporting
          what the user typed.  fullcommand("ho") returns "horizontal"
          even though :ho is below the documented 3-char minimum.
Solution: Add EX_WHOLE to :class, :def, :endclass, :endinterface,
          :endenum, :public and :static.  In get_function_body() pass
          the user-typed command to the error message.  Force :ho to
          CMD_SIZE in find_ex_command() so fullcommand() reflects the
          modifier minimum.  Extend tests and documentation accordingly
          (Peter Kenny).

fixes:  vim/vim#20032
closes: vim/vim#20191

38d9a16eba

Co-authored-by: Peter Kenny <github.com@k1w1.cyou>
2026-06-01 01:04:30 +00:00
Luuk van Baal
253378f86a perf(redraw): don't redraw hidden windows
Problem:  Hidden windows are redrawn unnecessarily.
Solution: If a window is hidden, don't bother drawing it.
2026-05-31 23:15:39 +02:00
Justin M. Keyes
f5fae7aa5c docs: misc, options, pos/range 2026-05-30 12:57:24 +02:00
zeertzjq
d214c24129 vim-patch:9.2.0538: Cannot keep leading whitespace in %{} statusline expr (#40007)
Problem:  A leading space in the result of a %{} item is sometimes
          stripped, and an all-digit result is converted to a number.
Solution: Add %0{} atom which inserts the expression result verbatim
          (glepnir)

fixes:  vim/vim#3898
closes: vim/vim#20315

e8d7a40b98

Co-authored-by: glepnir <glephunter@gmail.com>
2026-05-26 01:04:24 +00:00
zeertzjq
f53d9ac90b vim-patch:c7645fc: runtime(doc): add a few references to mouse behaviour (#39959)
fixes: vim/vim#20281

c7645fcda5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-23 07:47:49 +08:00
Kyle
7337e02563 refactor(docs): generate tui.txt $NVIM_TERMDEFS keys #39836
Problem:
Potential documentation drift in `tui.txt` if fields for
`$NVIM_TERMDEFS` change.

Solution:
Generate docs for `tui.txt`. Add `brief_xform` to `gen_vimdoc.lua` to
allow transforming briefs during generation.
2026-05-21 04:39:45 -04:00
Justin M. Keyes
f1fad32e2e docs: misc, custom text-object #39877
text-object-define is a pattern I found in tpope's plugins (e.g.
https://github.com/tpope/vim-jdaddy) which shows an elegant way to
define a text-object. (Any mistakes in the example are my fault.)
2026-05-20 05:21:27 -04:00
Barrett Ruth
5181984db9 fix(api): nvim_exec_autocmds({buf=x}) runs in buffer context #39061
Problem: `nvim_exec_autocmds({ buf = ... })` matches the target buffer, but callbacks and modelines run with the caller buffer current rather than the target buffer.

Solution: Execute the buffered path in prepared target-buffer context and restore the caller afterward.
2026-05-20 03:48:55 -04:00
Puneet Dixit
fff9897ce3 fix(startup): emitting useless OptionSet #39830
Problem:
During startup, we manually trigger a useless and misleading `OptionSet`
event, which doesn't set `v:option_*` values (this is a limitation of
`nvim_exec_autocmds`).
ad4bc2d90c/runtime/lua/vim/_core/defaults.lua (L939).

Solution:
The `nvim_exec_autocmds('OptionSet',…)` call does not serve any purpose
since 5cbb9d613b, so just drop it.
2026-05-17 12:18:24 -04:00
Justin M. Keyes
846b8b2420 refactor: group nvim_buf_call, nvim_win_call tests #39828 2026-05-17 11:20:54 -04:00
bfredl
0aa7d2f4d5 feat(api): nvim_buf_call, win_call can has multiple return values #39801
from the "because we can and it is not much code" department. (diffcount
excluding tests is actually negative)

fixes https://github.com/neovim/neovim/issues/39636#issuecomment-4397141270
2026-05-17 10:25:22 -04:00
Justin M. Keyes
e572c9c80a feat(api): tab-local option scope #39811
Problem:
2d795face6 added support for tab-local options ('cmdheight')
to `nvim_get_option_value`, but not to:

    nvim_get_option_info2()
    nvim_set_option_value(…, { tab = … })
    gettabwinvar()

Solution:
- Update `options.lua` to model tab-local options. Introduce `kOptScopeTab`.
- Handle tab scope in the options layer so it works for all options APIs.

Note:
- No change to `gettabvar()`. Not sure if needed/wanted.

fix https://github.com/neovim/neovim/issues/31140
2026-05-17 10:24:46 -04:00
yashlala
7d99104058 feat(events): add TabMoved autocommand event #24137
Problem:
No way to handle a "tab moved" event.
Use-case: tabline plugins may cache tab labels, and need to know when to
invalidate their cache.

Solution:
Add a `TabMoved` event that triggers whenever tabs are reordered via `:tabmove`
or via mouse click-and-drag.
2026-05-16 13:55:42 -04:00
Tomas Slusny
a0637e0c4e feat(prompt): support 'scrollback' option in prompt-buffers #39793
Problem:
There is a lot of overlap between terminal and prompt buffer, but no
easy way to limit the number of lines kept above the prompt to prevent
performance and other issues. This is desirable for both example
use cases in current documentation, chat UI and repl/shell plugins.

Solution:
Use existing 'scrollback' option to limit prompt-buffer lines
as well.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2026-05-16 10:14:18 -04:00
EliWiegman
2d795face6 fix(api): nvim_get_option_value tab-local 'cmdheight' #39259
Problem:
API clients cannot query the tab-local value of 'cmdheight'.

Solution:
Allow nvim_get_option_value() to accept { tab = <tab-ID> } for 'cmdheight'.
2026-05-16 09:31:05 -04:00
Justin M. Keyes
4f27b585e9 docs: dev, lsp, indent-guides #39756
- document "indent guides" https://github.com/neovim/neovim/issues/39726
- document guidance for "subcommands" https://github.com/neovim/neovim/issues/32263#issuecomment-4436002808

Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: Noa Levi <275430404+lphuc2250gma@users.noreply.github.com>
2026-05-14 13:13:30 -04:00
zeertzjq
871b4b1642 vim-patch:9.2.0470: No way to hook into put commands
Problem:  No way to hook into put commands
          (yochem)
Solution: Introduce TextPutPre and TextPutPost autocommands
          (Foxe Chen).

fixes:  vim/vim#18701
closes: vim/vim#20144

e0781bd5bf

Co-authored-by: Foxe Chen <chen.foxe@gmail.com>
2026-05-13 06:57:07 +08:00
bfredl
9c42db1181 feat(ui_client): "press ENTER" free nvim crash debugging
This feature might be a little silly and niche, but it is very useful
for _my_ workflow (and open source is about mee)

An issue which is never present on high quality RELEASE builds, but
might occur on Debug builds is that the Nvim server crashes
on some error in your unfinished PR code. If you compile your debug
builds with sanitizers enabled, as you should, the ASAN/UBSAN runtime
will print some useful info about your mistake to stderr or a log file,
such as a stack trace. This can be used to jump to the error in the
code.

This allows the nvim server to install a signal hander in the ui client,
which can load this log file in a good safe version of nvim and parse it
using 'errorformat'

This is inspired by the "press ENTER" free workflow of ui2 and applies
it beyond the lifetime cycle of the nvim instance.

example config:
```lua
    local asan = vim.env.ASAN_OPTIONS
    if asan ~= nil and string.match(asan, "log_path=/tmp/nvim_asan")  then
      local myname = "/tmp/nvim_asan."..vim.uv.getpid()

      local args = {"--embed", "-n", "+set efm=%+A%*[^/]%f:%l:%c", "+silent cfile "..myname, "+silent cfirst", "+silent copen"}

      vim.api.nvim__set_restart_on_crash("nvim", args)
    end
```

and run your debug nvim like so

    ASAN_OPTIONS=handle_abort=1,handle_sigill=1,log_path=/tmp/nvim_asan ./build/bin/nvim
2026-05-11 11:00:03 +02:00