aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
Commit message (Collapse)AuthorAge
...
* vim-patch:9.2.0538: Cannot keep leading whitespace in %{} statusline expr ↵zeertzjq2026-05-26
| | | | | | | | | | | | | | | (#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 https://github.com/vim/vim/commit/e8d7a40b98ce4062834399f097216213a0088ff3 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:c7645fc: runtime(doc): add a few references to mouse behaviour ↵zeertzjq2026-05-23
| | | | | | | | | (#39959) fixes: vim/vim#20281 https://github.com/vim/vim/commit/c7645fcda50f95cc098545b70ce937a986b997d1 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(startup): emitting useless OptionSet #39830Puneet Dixit2026-05-17
| | | | | | | | | | | 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`). https://github.com/neovim/neovim/blob/ad4bc2d90c5109c24bf6f0119ad31276f1518c6f/runtime/lua/vim/_core/defaults.lua#L939. Solution: The `nvim_exec_autocmds('OptionSet',…)` call does not serve any purpose since 5cbb9d613bf6d8983b5effd7e20343a4ef497c06, so just drop it.
* feat(api): tab-local option scope #39811Justin M. Keyes2026-05-17
| | | | | | | | | | | | | | | | | | Problem: 2d795face6e4 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
* feat(prompt): support 'scrollback' option in prompt-buffers #39793Tomas Slusny2026-05-16
| | | | | | | | | | | | | | 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>
* docs: dev, lsp, indent-guides #39756Justin M. Keyes2026-05-14
| | | | | | | - 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>
* docs: misc, window #39720Justin M. Keyes2026-05-10
| | | | - formalize `window-number` similar to `tabpage-number`. - reference it from docs.
* vim-patch:9.2.0458: Crash with invalid shellredir/shellpipe value (#39691)zeertzjq2026-05-09
| | | | | | | | | | | | Problem: Crash with invalid shellredir/shellpipe value (bfredl) Solution: Validate the option and allow only a single "%s". fixes: vim/vim#20157 closes: vim/vim#20159 https://github.com/vim/vim/commit/84ae09dd79b9888ba71dc2a28f9afcac3e7b8901 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.2.0455: 'findfunc' only allows extra info for cmdline completionzeertzjq2026-05-09
| | | | | | | | | | | | Problem: 'findfunc' only allows extra info for cmdline completion, not for actually finding files (Maxim Kim, after 9.2.0451). Solution: Handle returning a list of dicts when actually finding files. Also fix crash on NULL string (zeertzjq). fixes: vim/vim#20163 closes: vim/vim#20164 https://github.com/vim/vim/commit/9694ff58fe510bf3906a7b6817429e29d5975987
* vim-patch:9.2.0451: 'findfunc' can't return extra info for cmdline completionzeertzjq2026-05-09
| | | | | | | | | | | | Problem: 'findfunc' can't return extra info for cmdline completion (Maxim Kim). Solution: Handle 'findfunc' return value in cmdline completion like that of "customlist" functions (zeertzjq). fixes: vim/vim#20155 closes: vim/vim#20158 https://github.com/vim/vim/commit/58124789aaf98fd96cd94a738633fd652a5e079a
* docs: misc, rename "tabpage"Justin M. Keyes2026-05-07
| | | | | | Co-authored-by: michael-grunder <michael.grunder@gmail.com> Co-authored-by: Olivia Kinnear <git@superatomic.dev> Co-authored-by: Felipe Matarazzo <felipemps@protonmail.com>
* vim-patch:bb807eb: runtime(doc): Tweak documentation style (#39597)zeertzjq2026-05-05
| | | | | | | closes: vim/vim#20134 https://github.com/vim/vim/commit/bb807ebc8a7a6ad3f3d330cf19ce775cb40a2811 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.2.0425: Cannot silence undo/redo messages (#39554)zeertzjq2026-05-02
| | | | | | | | | | | | Problem: Cannot silence undo/redo messages Solution: Add "u" flag to 'shortmess' option (Shougo Matsushita). fixes: vim/vim#20049 closes: vim/vim#20107 https://github.com/vim/vim/commit/d25f8d1b2c6e0cbd390a36884c95edc88f1b3d69 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* vim-patch:9.2.0417: completion: no support for "noinsert" with 'wildmode' ↵glepnir2026-04-30
| | | | | | | | | | | | | (#39516) Problem: completion: no support for "noinsert" with 'wildmode' and commandline completion Solution: Add "noinsert" value to the 'wildmode' option, mirroring 'completeopt' "noinsert" behaviour (glepnir). fixes: vim/vim#16551 closes: vim/vim#20080 https://github.com/vim/vim/commit/af494af5ff188d976073cbc049249614edffa4bf
* vim-patch:9.2.0413: Scrolling wrong with 'splitkeep' when changing ↵zeertzjq2026-04-29
| | | | | | | | | | | | | | | 'cmdheight' (#39493) Problem: Cursor is not adjusted when 'cmdheight' is changed to cover the cursor with 'splitkeep' ~= "cursor". Solution: Handle window resize for 'splitkeep' after changing 'cmdheight'. Ensure previous window height is set when changing 'splitkeep' (Luuk van Baal). closes: vim/vim#20043 https://github.com/vim/vim/commit/bd0f3e6da5df70ab2250264d0a7efc7db83c3dc8 Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* docs: misc #39256Justin M. Keyes2026-04-25
|
* feat(tui): restore 'ttyfast' to control tty requests #38699Kyle2026-04-24
| | | | | | | | | | | | Problem: When running nvim on a remote machine over SSH, if there is high ping, then bg detection may not complete in time. This results in a warning every time nvim is started. #38648 Solution: Restore 'ttyfast' option and allow it to control whether or not bg detection is performed. Because this is during startup and before any user config or commands, we use the environment variable `NVIM_NOTTYFAST` to allow disabling `ttyfast` during initialization.
* fix(options): default 'titlestring' shows CWD #39233Nick Krichevsky2026-04-22
| | | | | | | Problem: In the default 'titlestring', if the containing directory is the CWD, it renders as "." Solution: Add `:p` to the titlestring.
* vim-patch:3918f32: runtime(doc): fix incorrect description of 'scrolloffpad'zeertzjq2026-04-22
| | | | | | closes: vim/vim#20029 https://github.com/vim/vim/commit/3918f3232f874b3c96f8bfccc5049711f16c252e
* vim-patch:9.2.0356: Cannot apply 'scrolloff' context lines at end of filezeertzjq2026-04-22
| | | | | | | | | | | | Problem: Cannot apply 'scrolloff' context lines at end of file Solution: Add the 'scrolloffpad' option to keep 'scrolloff' context even when at the end of the file (McAuley Penney). closes: vim/vim#19040 https://github.com/vim/vim/commit/a414630393f81c9a5b8fa4d0fcc1287155f67751 Co-authored-by: McAuley Penney <jacobmpenney@gmail.com>
* docs: misc #39207Justin M. Keyes2026-04-20
|
* feat(options): add 'winpinned' to pin a window #39157luukvbaal2026-04-19
| | | | | | | | | | | | | | Problem: - Unable to "pin" a window to prevent closing without specifically being targeted. - :fclose closes hidden windows (even before visible windows). Solution: - Add 'winpinned' window-local option. When set, window is skipped by :fclose and :only. Pin the ui2 cmdline window (which should always be visible), so that it is not closed by :only/fclose. - Skip over hidden (and pinned) windows with :fclose. Co-authored-by: glepnir <glephunter@gmail.com>
* docs: misc #39045Justin M. Keyes2026-04-18
|
* vim-patch:8.2.2440: documentation based on patches is outdated (#39144)zeertzjq2026-04-17
| | | | | | | | | | | Problem: Documentation based on patches is outdated. Solution: Add changes to documentation in a patch. https://github.com/vim/vim/commit/853886722c051ecaef6d818ce32a822e4f43dc2b Trailing space was removed in later patches. Also fix a few more misplaced error numbers from #8155. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: lint EXX error codes #8155Justin M. Keyes2026-04-16
| | | | | | | | | | | Problem: - Choosing a new EXX error code is tedious. - It's possible to accidentally use an EXX error code for different purposes. Solution: Add a lint check which requires EXX error codes to have a :help tag. This also avoids duplicates because `make doc` does `:helptags ++t doc` which fails if duplicates are found.
* docs: lsp, options, api #38980Justin M. Keyes2026-04-14
| | | | | | | | | docs: lsp, options - revert bogus change to `_meta/builtin_types.lua` from 3a4a66017b74 Close #38991 Co-authored-by: David Mejorado <david.mejorado@gmail.com>
* refactor(options): generate "modeline disallowed" doc text #39019Justin M. Keyes2026-04-14
| | | | | | | | | | | Problem: - Lots of redundant text in options docs for "not allowed in a modeline", even though we already have a flag that indicates that. - `deny_in_modelines` is an old vestigial flag only used by 'encoding' (which never changes). Solution: - Generate docs based on the `secure` flag. - Remove the `deny_in_modelines` flag (`kOptFlagNoML`).
* feat(completion): completeopt=preselect, LSP CompletionItem.preselect #36613glepnir2026-04-13
| | | | | | | | | | Problem: LSP CompletionItem.preselect is not supported. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionClientCapabilities Solution: - Add "preselect" field to complete-items and "preselect" flag to 'completeopt'. - Set preselectSupport=true in LSP client capabilities.
* Merge #38882 docsJustin M. Keyes2026-04-12
|\
| * docs: miscJustin M. Keyes2026-04-12
| | | | | | | | | | | | | | | | Close #38748 Close #38866 Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com> Co-authored-by: Anakin Childerhose <anakin@childerhose.ca>
* | fix(normal): pass count to 'keywordprg' as arg1 #38965Barrett Ruth2026-04-12
|/ | | | | | | | | Problem: If `'keywordprg'` begins with `:`, `3K` turns the count into an Ex range. Commands that don't support that then fail. Vim passes the count as the first arg (see #19436, vim/vim#10745). Solution: Pass `[count]` as the first arg for `'keywordprg'`.
* vim-patch:794c304: runtime(doc): clarify incsearch feature and typed chars ↵zeertzjq2026-04-07
| | | | | | | | | (#38830) fixes: vim/vim#19886 https://github.com/vim/vim/commit/794c3044794330d8d0eadf71635d3892c187794c Co-authored-by: Christian Brabandt <cb@256bit.org>
* docs: statuslineJustin M. Keyes2026-04-06
| | | | fix https://github.com/neovim/neovim/issues/38670
* vim-patch:af58a9f: runtime(doc): adjust :h 'autowrite' and :h 'autowriteall'zeertzjq2026-04-04
| | | | | | | | | | | | - Don't go over 78 columns. - Change the first "and" to "or", as "or" is used below. - Change "takes one" to "switches", as "one" may be mistaken as referring to the command instead of the user. - Use backticks in :h 'autowriteall' like in :h 'autowrite'. closes: vim/vim#19859 https://github.com/vim/vim/commit/af58a9f5e9e0bf748700645d07c6262eb281d737
* vim-patch:9.2.0267: 'autowrite' not triggered for :termzeertzjq2026-04-04
| | | | | | | | | | | | Problem: 'autowrite' not triggered for :term Solution: Trigger autowrite for :term command (rendcrx) closes: vim/vim#19855 https://github.com/vim/vim/commit/466b5f531a9818d4fa834126d64e8b771e4a497f Co-authored-by: rendcrx <974449413@qq.com>
* vim-patch:9.2.0277: tests: test_modeline.vim fails (#38672)zeertzjq2026-04-01
| | | | | | | Problem: tests: test_modeline.vim fails (after v9.2.0276) Solution: Rewrite the tests to use the existing s:modeline_fails() function, update documentation (zeertzjq). https://github.com/vim/vim/commit/8c8772c6b321d4955c8f09926e3eda2b4cd83680
* vim-patch:9.2.0276: [security]: modeline security bypass (#38657)zeertzjq2026-04-01
| | | | | | | | | | | | Problem: [security]: modeline security bypass Solution: disallow mapset() from secure mode, set the P_MLE flag for the 'complete', 'guitabtooltip' and 'printheader' options. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-8h6p-m6gr-mpw9 https://github.com/vim/vim/commit/75661a66a1db1e1f3f1245c615f13a7de44c0587 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(progress): show progress-status only in curwin #38458Shadman2026-03-24
| | | | | | | | | | | | | | | | Problem: Currently same progress stat get's displayed on statusline of all windows. This is repeatitive and noisy. Solultion: Only display progress-status on the focused window Problem: Currently, when multiple progress are on going we show it as Progress: {N} items {percent}% format. It can be simplified sinnce items doesn't really add enough value for the valuable space it takes in statusline Solution: Change format to Progress: {percent}%({N})
* docs: api, plugins, ui2Justin M. Keyes2026-03-24
|
* vim-patch:9.2.0223: Option handling for key:value suboptions is limited (#38426)zeertzjq2026-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Option handling for key:value suboptions is limited Solution: Improve :set+=, :set-= and :set^= for options that use "key:value" pairs (Hirohito Higashi) For comma-separated options with P_COLON (e.g., diffopt, listchars, fillchars), :set += -= ^= now processes each comma-separated item individually instead of treating the whole value as a single string. For :set += and :set ^=: - A "key:value" item where the key already exists with a different value: the old item is replaced. - An exact duplicate item is left unchanged. - A new item is appended (+=) or prepended (^=). For :set -=: - A "key:value" or "key:" item removes by key match regardless of value. - A non-colon item removes by exact match. This also handles multiple non-colon items (e.g., :set diffopt-=filler,internal) by processing each item individually, making the behavior order-independent. Previously, :set += simply appended the value, causing duplicate keys to accumulate. fixes: vim/vim#18495 closes: vim/vim#19783 https://github.com/vim/vim/commit/e2f4e18437074868d89ed5c368af8c55ddc394e1 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(progress): status api, 'statusline' integration #35428Shadman2026-03-20
| | | | | | | | | | | | | | Problem: Default statusline doesn't show progress status. Solution: - Provide `vim.ui.progress_status()`. - Include it in the default 'statusline'. How it works: Status text summarizes "running" progress messages. - If none: returns empty string - If one running item: "title: percent%" - If multiple running items: "Progress: N items avg-percent%"
* fix(ui): apply 'pumborder' to mouse menu, fix overflow #36193glepnir2026-03-19
| | | | | | | | | | | Problem: Mouse popup menus (right-click context menus) do not respect the 'pumborder' option and could overflow screen boundaries when borders were enabled near the edge. Solution: - Remove the mouse menu exclusion from border rendering. - Add boundary check to shift menu left when border would exceed screen width, ensuring complete visibility of menu content and borders.
* docs: api, lsp, messages, intro #38327Justin M. Keyes2026-03-17
|
* feat(diff): merge adjacent blocks using inline:word (#37085)Harsh Kapse2026-03-17
| | | | | | | | | | | | | | | | | | | | | vim-patch:9.2.0174: diff: inline word-diffs can be fragmented Problem: When using 'diffopt=inline:word', lines were excessively fragmented with punctuation creating separate highlight blocks, making it harder to read the diffs. Solution: Added 'diff_refine_inline_word_highlight()' to merge adjacent diff blocks that are separated by small gaps of non-word characters (up to 5 bytes by default) (HarshK97). When using inline:word diff mode, adjacent changed words separated by punctuation or whitespace are now merged into a single highlight block if the gap between them contains fewer than 5 non-word characters. This creates more readable diffs and closely matches GitHub's own diff display. closes: vim/vim#19098 https://github.com/vim/vim/commit/42c6686c78d39843f71dba989a8ea59bc6975132
* feat(progress): disable cmdline progress msg via messagesopt' #36730Shadman2026-03-16
| | | | | | | | | Problem: No way to disable progress messages in cmdline message area. If a third-party plugin handles Progress events + messages, the user may not want the "redundant" progress displayed in the cmdline message area. Solution: Support "progress:c" entry in 'messageopts' option.
* docs: miscJustin M. Keyes2026-03-16
|
* feat(help): super K (":help!") guesses tag at cursor #36205Justin M. Keyes2026-03-15
| | | | | | | | | | | | | Problem: `K` in help files may fail in some noisy text. Example: (`fun(config: vim.lsp.ClientConfig): boolean`) ^cursor Solution: - `:help!` (bang, no args) activates DWIM behavior: tries `<cWORD>`, then trims punctuation until a valid tag is found. - Set `keywordprg=:help!` by default. - Does not affect `CTRL-]`, that is still fully "tags" based.
* fix(statusline): missing info/hint diagnostics #38307phanium2026-03-15
| | | | | Problem: default stl treat vim.diagnostics.count() return as array Solution: next() tell if a dict is empty
* docs: miscJustin M. Keyes2026-03-12
|
* fix(prompt): don't implicitly set 'modified' #38118Willaaaaaaa2026-03-11
| | | | | | | | | | | | | Problem: In aec3d7915c55fc0b7dc73f6186cf0ae45d416d33 Vim changed prompt-buffers to respect 'modified' so the termdebug plugin can "control closing the window". But for most use-cases (REPL, shell, AI "chat", …), prompt-buffers are in practice always "modified", and no way to "save" them, so *implicitly* setting 'modified' is noisy and annoying. Solution: Don't implicitly set 'modified' when a prompt-buffer is updated. Plugins/users can still explicitly set 'modified', which will then trigger the "E37: No write since last change" warning.