Commit Graph

267 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
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
zeertzjq f1c57b39fd vim-patch:73f4162: runtime(doc): Tweak doc style in options.txt
https://github.com/vim/vim/commit/73f41626df1f1764007f073088048ffea4f970c4

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

https://github.com/vim/vim/commit/8526d32647245b3b623986949e7807b4b353e624

Co-authored-by: HarshK97 <harshkapse1234@gmail.com>
2026-03-03 08:05:58 +08:00
zeertzjq 7852993f49 vim-patch:9.2.0061: Not possible to know when a session will be loaded (#38071)
Problem:  Not possible to know when a session will be loaded.
Solution: Add the SessionLoadPre autocommand (Colin Kennedy).

fixes:  vim/vim#19084
closes: vim/vim#19306

https://github.com/vim/vim/commit/1c0d468d72e0220d4cb25936043ac35439a981b5

Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2026-02-26 21:30:44 +08:00
Sean Dewar 32d3dd0650 fix(statusline): broken statusline on error #38000
Problem: after #33036, an error from evaluating 'statusline' clears it and
doesn't draw the statusline. (causing glitchy redraws)

Solution: use the default value instead. If 'stl' is somehow ever empty, still
call redraw_custom_statusline to at least draw an empty statusline.

Ideally our default 'stl' shouldn't itself error too! :-)
Also adjust some prior screen:expect()s to avoid immediate success warnings.
2026-02-23 11:22:13 -05:00
zeertzjq 30d9970cd7 vim-patch:9.2.0036: completion: thesaurus completion incorrect with "longest/fuzzy" (#37996)
Problem:  completion: thesaurus completion incorrect with
          "longest/fuzzy" (Mao-Yining)
Solution: Disable fuzzy matching and longest-match insertion
          specifically for thesaurus completion (Girish Palya).

fixes:  vim/vim#19356
closes: vim/vim#19475

https://github.com/vim/vim/commit/26a3f486cc708b285b20e92c206f1615d20b23b6

Co-authored-by: Girish Palya <girishji@gmail.com>
2026-02-21 19:54:25 +08:00
Rahul Yedida 9492df027d fix(defaults): 'guifont' "monospace" fallback, trim spaces #37930
Problem:
Some UI clients break if space follows the comma in 'guifont' items.
Also the new 'guifont' default may cause problems if none of the fonts are found.

Solution:
Remove trailing whitespace. 
Add a "monospace" fallback which `fontconfig` can resolve on *nix systems.
2026-02-18 01:57:59 -05:00
Rahul Yedida 249f305bbc feat(defaults): per-platform 'guifont' default #37175
Problem:
Font rendering and kerning are subpar in GUIs.

Solution:
Set default 'guifont' based on common CSS fonts per:
https://github.com/system-fonts/modern-font-stacks#monospace-code
2026-02-16 09:05:23 -05:00
Riley Bruins 4719b94443 feat(statusline): option to specify stacking highlight groups #37153
**Problem:** No easy way to stack highlight groups #35806.

**Solution:** Add a way to specify a new statusline chunk with a
highlight group that inherits from previous highlight attributes.

Also applies to tabline, etc.
2026-02-15 12:16:51 -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

https://github.com/vim/vim/commit/9e456e52df83f64075ce94c9a5adc43e221a6d3c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-10 06:44:30 +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
zeertzjq c74d5ceda1 vim-patch:dd9f7e6: runtime(doc): Fix some overlength lines
closes: vim/vim#19286

https://github.com/vim/vim/commit/dd9f7e6cbbba6d8e63cca3b4c537dc9b8cc1837a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-01 08:30:59 +08:00
zeertzjq e3990f8643 vim-patch:9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: vim/vim#16518
closes: vim/vim#16855

https://github.com/vim/vim/commit/5606ca5349982fe53cc6a2ec6345aa66f0613d40

Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
2026-01-20 06:23:11 +08:00
zeertzjq d6e5286d2c vim-patch:9.1.0059: No event triggered before creating a window
Problem:  No event is triggered before creating a window.
          (Sergey Vlasov)
Solution: Add the WinNewPre event (Sergey Vlasov)

fixes: vim/vim#10635
closes: vim/vim#12761

https://github.com/vim/vim/commit/1f47db75fdc8c53c5c778b26ecfa0942ac801f22

Not sure if this should be triggered before creating a floating window,
as its use case is related to window layout.

Co-authored-by: Sergey Vlasov <sergey@vlasov.me>
2026-01-16 15:55:33 +08:00
zeertzjq 7a6e8d4430 docs: misc (#37281)
Close #37289
Close #37348

Co-authored-by: Marc Jakobi <marc@jakobi.dev>
Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 03:50:57 +00:00
zeertzjq aed1f8c377 vim-patch:9.1.2079: use-after-free with 'qftf' wiping buffer (#37364)
Problem:  use-after-free with 'quickfixtextfunc' wiping buffer
          (henices)
Solution: Evaluate 'quickfixtextfunc' with textlock enabled.

closes: vim/vim#19142

https://github.com/vim/vim/commit/300ea1133fba310ae8acd7fadc3ab3cc24e8402f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-12 07:04:36 +08:00
zeertzjq 1e44a001ec vim-patch:9.1.2024: 'fsync' option cannot be set per buffer (#37129)
Problem:  'fsync' option cannot be set per buffer
Solution: Make 'fsync' option global-local
          (glepnir)

closes: vim/vim#19019

https://github.com/vim/vim/commit/4d5b30372663e8ea356b25fe94334558c6ae283f

Co-authored-by: glepnir <glephunter@gmail.com>
2025-12-28 08:14:45 +08:00
zeertzjq 20c96f1515 vim-patch:2006415: runtime(doc): add reference to searchcount() function
https://github.com/vim/vim/commit/20064150169a94380abef37d3966c864531d1d92

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-24 08:53:31 +08: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
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
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 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

https://github.com/vim/vim/commit/4af6d9755cba0dd07e881172f2a6e0efe9986ddc

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-12-09 22:25:18 +08:00
Nathan Smith 551bb63d44 feat(events): MarkSet event, aucmd_defer() #35793
Problem:
- Can't subscribe to "mark" events.
- Executing events is risky because they can't be deferred.

Solution:
- Introduce `MarkSet` event.
- Introduce `aucmd_defer()`.

Helped-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-12-07 15:13:31 -05:00
Justin M. Keyes ebb7c38ca2 docs: misc
fix https://github.com/neovim/neovim.github.io/issues/419

Co-authored-by: Rob Pilling <robpilling@gmail.com>
2025-12-06 20:33:02 -05:00
zeertzjq 2c6469aca4 vim-patch:9.1.1933: completion: complete_match() is not useful (#36726)
Problem:  completion: complete_match() Vim script function and
          'isexpand' option are not that useful and confusing
          (after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
          (Girish Palya).

complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.

* `f_complete_match()` in `insexpand.c` does not call any completion code.
   It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
   It does nothing on its own and amounts to misuse of a new option.

The following Vim script function can be used to implement the same
functionality:

```vim
  func CompleteMatch(triggers, sep=',')
    let line = getline('.')->strpart(0, col('.') - 1)
    let result = []
    for trig in split(a:triggers, a:sep)
      let idx = strridx(line, trig)
      if l:idx >= 0
        call add(result, [idx + 1, trig])
      endif
    endfor
    return result
  endfunc
```

related: vim/vim#16716
fixes: vim/vim#18563
closes: vim/vim#18790

https://github.com/vim/vim/commit/cbcbff871224115c45bbd14582749a487c6fad30

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-11-28 10:10:31 +08:00
zeertzjq 0b888ea039 vim-patch:b217ffb: runtime(doc): remove outdated help about 'completeopt' "fuzzy"
closes: vim/vim#18815

https://github.com/vim/vim/commit/b217ffbef27c416d6c9b4b7e5a08f61f54013748
2025-11-28 07:53:49 +08:00
zeertzjq 812186e2dc vim-patch:9.1.1930: completion: 'completefuzzycollect' is too obscure
Problem:  completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
          behave like 'completefuzzycollect' is set when fuzzy
          completion is enabled (Girish Palya).

fixes: vim/vim#18498
closes: vim/vim#18788

https://github.com/vim/vim/commit/33fbfe003c17ad25bf3903aaa89a55fe372086ba

Remove this option completely, as it's introduced in Nvim v0.12 cycle.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-11-28 07:53:49 +08:00
Riley Bruins 4107442103 feat(diagnostic): highlights in diagnostic.status() #36685
Applies the appropriate `DiagnosticSign*` highlight to each group,
resetting the highlights at the end of the expression.
2025-11-25 10:14:46 -08:00
zeertzjq dbd7f45873 vim-patch:2190036: runtime(doc): Add environment variable expansion note to options (#36675)
Add "Environment variables are expanded |:set_env|" documentation to
options that have the P_EXPAND flag but were missing this note.

Updated options:
- 'cdpath'
- 'dictionary'
- 'mkspellmem'
- 'packpath'
- 'runtimepath'
- 'spellfile'
- 'spellsuggest'
- 'thesaurus'
- 'ttytype'
- 'undodir'
- 'verbosefile'
- 'viewdir'
- 'viminfofile'

These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.

closes: vim/vim#18791

https://github.com/vim/vim/commit/2190036c8cfb1e94625756b8ffbb3aa65f04687e

Co-authored-by: Alex Plate <AlexPl292@gmail.com>
2025-11-24 10:29:39 +08:00
Yochem van Rosmalen 9bdb011a50 refactor(spellfile): config() interface, docs #36481
Problem:
- Exposing the raw config as table is a pattern not seen anywhere else
  in the Nvim codebase.
- Old spellfile.vim docs still available, no new documentation

Solution:
- Exposing a `config()` function that both acts as "getter" and "setter"
  is a much more common idiom (e.g. vim.lsp, vim.diagnostic).
- Add new documentation and link old docs to |spellfile.lua| instead of
  |spellfile.vim|.
2025-11-09 21:51:39 -08:00
Justin M. Keyes 6dd6c5b523 docs: rename l10n help files #36377 2025-10-28 20:15:16 -07:00
zeertzjq ee60bf6112 vim-patch:6be154f: runtime(doc): revert wrong 'incsearch' description
This reverts commit 3fc00c05fb464d3e806df53bdc1743faa337ddca.

related: vim/vim#18639

https://github.com/vim/vim/commit/6be154f5e63d47b9e0e5b709577a8c71aa4e4456

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-29 08:05:28 +08:00
zeertzjq d8326ed15d vim-patch:3fc00c0: runtime(doc): mention that 'incsearch' ignores addresses and offset
closes: vim/vim#18639

https://github.com/vim/vim/commit/3fc00c05fb464d3e806df53bdc1743faa337ddca

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-27 08:22:12 +08:00
Maria Solano c90135d6e5 docs(ui): 'pumborder' #36255 2025-10-20 15:10:03 -07:00
zeertzjq a65202e6bd vim-patch:partial:c58f91c: runtime(doc): Whitespace updates (#36160)
Use double sentence spacing and wrap lines at 'textwidth'.  Code
examples and tables were not wrapped unless this had already been done
locally.

closes: vim/vim#18453

https://github.com/vim/vim/commit/c58f91c035db09358c282f2a908e2aea4287785e

Fix incorrect docs in :h ModeChanged.
Cherry-pick :h bufnr() changes from patch 8.1.2080.

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-13 08:53:21 +00:00
glepnir 072f126453 fix(ui): 'pumborder' parsing, shadow #36127
Problem:
1. Setting `pumborder=+,+,+,+,+,+,+,+` failed to render the custom
   border characters correctly. The issue occurred in `parse_winborder()`
   where it incorrectly used `p_winborder` instead of the `border_opt`
   parameter when the option value didn't contain commas.
2. In `pum_redraw()`, calling `parse_border_style()` directly with the
   option string failed to parse comma-separated border characters.
3. Missing documentation for PmenuShadow and PmenuShadowThrough
   highlight groups used by the shadow border style.
4. Coverity reports CID 631420: passing WinConfig (480 bytes) by value
   in `grid_draw_border()`.
5. crash when using `shadow` value on pumborder.

Solution:
1. Fix `parse_winborder()` to use `border_opt` parameter consistently,
   ensuring the correct option value is parsed regardless of which
   option (winborder/pumborder) is being set.
2. Update `pum_redraw()` to call `parse_winborder()` instead of
   `parse_border_style()`, properly handling both predefined styles
   and custom comma-separated border characters.
3. Add documentation for PmenuShadow (blended shadow areas) and
   PmenuShadowThrough (see-through corners) highlight groups.
4. Change `grid_draw_border()` to accept WinConfig by pointer.
5. When the "shadow" style is used, no additional row and column offset
   is applied, and the border width is reduced.
2025-10-11 19:48:27 -07:00
glepnir fafc329bbd feat(ui): 'pumborder' (popup menu border) #25541
Problem:
Popup menu cannot have a border.

Solution:
Support 'pumborder' option.
Generalize `win_redr_border` to `grid_redr_border`,
which redraws border for window grid and pum grid.
2025-10-10 07:14:50 -07:00
zeertzjq b6b80824cc vim-patch:9.1.1819: Cannot configure the inner foldlevel indicator (#36010)
Problem:  Cannot configure the inner foldlevel indicator for the
          foldcolumn
Solution: Add "foldinner" suboption value to the 'fillchar' option
          (Maria José Solano).

closes: vim/vim#18365

https://github.com/vim/vim/commit/1a691afd2717732c6f42dfe3278a9540db0d8110

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
2025-10-03 23:53:29 +00:00
zeertzjq 1939ec1763 vim-patch:09b1ce0: runtime(doc): fix typo after commit cfcf1a57cbef (#36001)
related: vim/vim#18452

https://github.com/vim/vim/commit/09b1ce08600bf2b423cb5b3a16952bf183bed1ff

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-03 17:30:24 +08:00
zeertzjq 9f33b69cfd vim-patch:cfcf1a5: runtime(doc): Clarify use of "noselect" in 'completeopt'
closes: vim/vim#18452

https://github.com/vim/vim/commit/cfcf1a57cbef90831c26626aee6ba9491fb85cb3

Co-authored-by: Girish Palya <girishji@gmail.com>
Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
2025-10-02 11:40:36 +08:00
zeertzjq 3f422cb5eb vim-patch:6e28211: runtime(doc): Tweak documentation style
closes: vim/vim#18462

https://github.com/vim/vim/commit/6e282117c7409af15f33120e67a00c47eefbbba5

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-10-02 11:40:36 +08:00
zeertzjq 7b9c063d11 vim-patch:9.1.1797: completion: autocompletion can be improved
Problem:  completion: autocompletion can be improved
Solution: Add support for "longest" and "preinsert" in 'autocomplete';
          add preinserted() (Girish Palya)

* Add support for "longest" in 'completeopt' when 'autocomplete'
  is enabled. (Note: the cursor position does not change automatically
  when 'autocomplete' is enabled.)
* Add support for "preinsert" when 'autocomplete' is enabled. Ensure
  "preinsert" works the same with and without 'autocomplete'
* introduce the preinserted() Vim script function, useful for defining
  custom key mappings.

fixes: vim/vim#18314
closes: vim/vim#18387

https://github.com/vim/vim/commit/c05335082adb21d99d96374779856444a3a0688f

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-30 09:32:33 +08:00
zeertzjq af2932e2dc vim-patch:992e307: runtime(doc): update list of modifiers at :h expand() (#35957)
fixes: vim/vim#18435

https://github.com/vim/vim/commit/992e30774f5ec81f53d5554c42137d3c85999081

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-30 08:26:40 +08:00
Justin M. Keyes 2739ab485e docs: json, tests, lsp #35754
Close #35926
Close #35818

Co-authored-by: skewb1k <skewb1kunix@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
2025-09-28 20:57:59 -07:00
zeertzjq 0fa0717d4e vim-patch:9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
Problem:  'nowrap' in a modeline may hide malicious code.
Solution: Forcibly use '>' as 'listchars' "extends" if 'nowrap' was set
          from a modeline (zeertzjq).

Manual `:setlocal nowrap` disables this behavior.  There is a separate
problem with `:set nowrap` that also applies to some other options.

related: vim/vim#18214
related: vim/vim#18399
closes: vim/vim#18425

https://github.com/vim/vim/commit/9d5208a9313dd8b0d62c97af5485f1715af98a1c

Cherry-pick some test_modeline.vim changes from patches 9.0.{0363,0626}.
2025-09-29 07:48:46 +08:00
zeertzjq 4b4d58a2f9 vim-patch:224f8ca: runtime(doc): clarify 'fileignorecase' option setting (#35879)
fixes: vim/vim#18360

https://github.com/vim/vim/commit/224f8ca769f2f5c8c4f3293e2adf7672418ba2fe

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-23 07:10:00 +08:00
zeertzjq a70997442e vim-patch:9.1.1779: completion: 'autocomplete' cannot be enabled per buffer (#35853)
Problem:  completion: 'autocomplete' cannot be enabled per buffer
          (Tomasz N)
Solution: Make 'autocomplete' global or local to buffer (Girish Palya)

fixes: vim/vim#18320
closes: vim/vim#18333

https://github.com/vim/vim/commit/0208b3e80a080740ff77a5661d0f65090e317d90

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-21 00:56:38 +00:00