aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/options.lua
Commit message (Collapse)AuthorAge
...
* vim-patch:9.1.1933: completion: complete_match() is not useful (#36726)zeertzjq2025-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* vim-patch:b217ffb: runtime(doc): remove outdated help about 'completeopt' ↵zeertzjq2025-11-28
| | | | | | | | "fuzzy" closes: vim/vim#18815 https://github.com/vim/vim/commit/b217ffbef27c416d6c9b4b7e5a08f61f54013748
* vim-patch:9.1.1930: completion: 'completefuzzycollect' is too obscurezeertzjq2025-11-28
| | | | | | | | | | | | | | | | 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>
* feat(diagnostic): highlights in diagnostic.status() #36685Riley Bruins2025-11-25
| | | | Applies the appropriate `DiagnosticSign*` highlight to each group, resetting the highlights at the end of the expression.
* vim-patch:2190036: runtime(doc): Add environment variable expansion note to ↵zeertzjq2025-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* refactor(spellfile): config() interface, docs #36481Yochem van Rosmalen2025-11-09
| | | | | | | | | | | | 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|.
* docs: rename l10n help files #36377Justin M. Keyes2025-10-28
|
* vim-patch:6be154f: runtime(doc): revert wrong 'incsearch' descriptionzeertzjq2025-10-29
| | | | | | | | | | This reverts commit 3fc00c05fb464d3e806df53bdc1743faa337ddca. related: vim/vim#18639 https://github.com/vim/vim/commit/6be154f5e63d47b9e0e5b709577a8c71aa4e4456 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:3fc00c0: runtime(doc): mention that 'incsearch' ignores addresses ↵zeertzjq2025-10-27
| | | | | | | | | | and offset closes: vim/vim#18639 https://github.com/vim/vim/commit/3fc00c05fb464d3e806df53bdc1743faa337ddca Co-authored-by: Christian Brabandt <cb@256bit.org>
* docs(ui): 'pumborder' #36255Maria Solano2025-10-20
|
* vim-patch:partial:c58f91c: runtime(doc): Whitespace updates (#36160)zeertzjq2025-10-13
| | | | | | | | | | | | | | 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>
* fix(ui): 'pumborder' parsing, shadow #36127glepnir2025-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* feat(ui): 'pumborder' (popup menu border) #25541glepnir2025-10-10
| | | | | | | | | 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.
* vim-patch:9.1.1819: Cannot configure the inner foldlevel indicator (#36010)zeertzjq2025-10-03
| | | | | | | | | | | | 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>
* vim-patch:09b1ce0: runtime(doc): fix typo after commit cfcf1a57cbef (#36001)zeertzjq2025-10-03
| | | | | | | related: vim/vim#18452 https://github.com/vim/vim/commit/09b1ce08600bf2b423cb5b3a16952bf183bed1ff Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:cfcf1a5: runtime(doc): Clarify use of "noselect" in 'completeopt'zeertzjq2025-10-02
| | | | | | | | | 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>
* vim-patch:6e28211: runtime(doc): Tweak documentation stylezeertzjq2025-10-02
| | | | | | | | closes: vim/vim#18462 https://github.com/vim/vim/commit/6e282117c7409af15f33120e67a00c47eefbbba5 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1797: completion: autocompletion can be improvedzeertzjq2025-09-30
| | | | | | | | | | | | | | | | | | | | | 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>
* vim-patch:992e307: runtime(doc): update list of modifiers at :h expand() ↵zeertzjq2025-09-30
| | | | | | | | | (#35957) fixes: vim/vim#18435 https://github.com/vim/vim/commit/992e30774f5ec81f53d5554c42137d3c85999081 Co-authored-by: Christian Brabandt <cb@256bit.org>
* docs: json, tests, lsp #35754Justin M. Keyes2025-09-28
| | | | | | | Close #35926 Close #35818 Co-authored-by: skewb1k <skewb1kunix@gmail.com> Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)zeertzjq2025-09-29
| | | | | | | | | | | | | | | | 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}.
* vim-patch:224f8ca: runtime(doc): clarify 'fileignorecase' option setting ↵zeertzjq2025-09-23
| | | | | | | | | (#35879) fixes: vim/vim#18360 https://github.com/vim/vim/commit/224f8ca769f2f5c8c4f3293e2adf7672418ba2fe Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1779: completion: 'autocomplete' cannot be enabled per buffer ↵zeertzjq2025-09-21
| | | | | | | | | | | | | | (#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>
* docs: small fixes (#35791)zeertzjq2025-09-16
| | | | | | | | | | | | | | | | | | | | | Close #34938 Close #35030 Close #35233 Close #35259 Close #35290 Close #35433 Close #35541 Close #35766 Close #35792 Co-authored-by: huylg <45591413+huylg@users.noreply.github.com> Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com> Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com> Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com> Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com> Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com> Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com> Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com> Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
* vim-patch:partial:235e77a: runtime(doc): Tweak documentation style more in ↵zeertzjq2025-09-15
| | | | | | | | | | | options and ft_hare (#35761) closes: 18289 https://github.com/vim/vim/commit/235e77a3a35525671d6a5e60c180c0dcc0351ea1 Skip ft_hare.txt. Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:97e0f95: runtime(doc): tweak documentation style a bit more in ↵zeertzjq2025-09-14
| | | | | | | options.txt (#35755) related: vim/vim#18284 https://github.com/vim/vim/commit/97e0f955dadc58e878d9933ca6a5d97374573199
* vim-patch:partial:450d591: runtime(doc): tweak documentation style (#35748)zeertzjq2025-09-13
| | | | | | | | | closes: vim/vim#18284 https://github.com/vim/vim/commit/450d59145e8675e608611a37db5f722ae31e041d Skip ft_hare.txt. Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1753: defaults: 'diffopt' option value can be improved (#35727)zeertzjq2025-09-12
| | | | | | | | | | | | | | | | | | | | | | | Problem: defaults: 'diffopt' option value can be improved Solution: Update diffopt defaults to include "indent-heuristic" and "inline:char" (Yee Cheng Chin) The default diff options have not been updated much despite new functionality having been added to Vim. - indent-heurstic: This has been enabled by default in Git since 33de716387 in 2017. Given that Vim uses xdiff from Git, it makes sense to track the default configuration from Git. - inline:char: This turns on character-wise inline highlighting which is generally much better than the default inline:simple. It has been implemented since vim/vim#16881 and we have not seen reports of any issues with it, and it has received good feedbacks. closes: vim/vim#18255 https://github.com/vim/vim/commit/976b365305c2e9025813ff3c7fe52f8d927fafc3 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:a0f37db: runtime(doc): use a single pattern in :h 'incsearch' ↵zeertzjq2025-09-11
| | | | | | | | example (#35721) related: https://github.com/vim/vim/pull/18262#issuecomment-3277008408 closes: vim/vim#18270 https://github.com/vim/vim/commit/a0f37dbbf413537815656fb0752a8eb926acb05c
* vim-patch:b2c8848: runtime(doc): improve docs related to 'autocomplete'zeertzjq2025-09-11
| | | | | | | | | Manual completion can still be used when 'autocomplete' is set, so saying "active" is better than "enabled". closes: vim/vim#18261 https://github.com/vim/vim/commit/b2c88480553de7a7dc247fe8e361c8365eb4edec
* vim-patch:9.1.1750: completion: preinserted text highlighed using ComplMatchInszeertzjq2025-09-11
| | | | | | | | | | | | | | | | | | Problem: completion: preinserted text highlighed using ComplMatchIns Solution: Use highlighting group PreInsert and update the documentation (Girish Palya). When "preinsert" is included in 'completeopt', only the PreInsert highlight group should be applied, whether autocompletion is active or not. Previously, ComplMatchIns was used when autocompletion was not enabled. Related to https://github.com/vim/vim/pull/18213. closes: vim/vim#18254 https://github.com/vim/vim/commit/2525c56e423b3ddce8de925f582b9c4d00079675 Co-authored-by: Girish Palya <girishji@gmail.com>
* vim-patch:9.1.1742: complete: preinsert does not work well with ↵zeertzjq2025-09-09
| | | | | | | | | | | | | | | | | | | | 'autocomplete' (#35692) Problem: complete: preinsert does not work well with preinsert Solution: Make "preinsert" completeopt value work with autocompletion (Girish Palya) This change extends Insert mode autocompletion so that 'preinsert' also works when 'autocomplete' is enabled. Try: `:set ac cot=preinsert` See `:help 'cot'` for more details. closes: vim/vim#18213 https://github.com/vim/vim/commit/fa6fd41a943e6442c1a2ce6b0a237298b00ecca0 Co-authored-by: Girish Palya <girishji@gmail.com>
* feat(api): nvim_echo can emit Progress messages/events #34846Shadman2025-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Nvim does not have a core concept for indicating "progress" of long-running tasks. The LspProgress event is specific to LSP. Solution: - `nvim_echo` can emit `kind="progress"` messages. - Emits a `Progress` event. - Includes new fields (id, status, percent) in the `msg_show` ui-event. - The UI is expected to overwrite any message having the same id. - Messages have a globally unique ID. - `nvim_echo` returns the message ID. - `nvim_echo(… {id=…})` updates existing messages. Example: local grp = vim.api.nvim_create_augroup("Msg", {clear = true}) vim.api.nvim_create_autocmd('Progress', { pattern={"term"}, group = grp, callback = function(ev) print(string.format('event fired: %s', vim.inspect(ev))..'\n') end }) -- require('vim._extui').enable({enable=true, msg={target='msg', timeout=1000}}) vim.api.nvim_echo({{'searching'}}, true, {kind='progress', percent=80, status='running', title="terminal(ripgrep)"}) local id = vim.api.nvim_echo({{'searching'}}, true, {kind='progress', status='running', percent=10, title="terminal(ripgrep)"}) vim.api.nvim_echo({}, true, {id = id, kind='progress', percent=20, status = 'running', title='find tests'}) vim.api.nvim_echo({}, true, {id = id, kind='progress', status='running', percent=70}) vim.api.nvim_echo({{'complete'}}, true, {id = id, kind='progress', status='success', percent=100, title="find tests"}) Followups: - Integrate with 'statusline' by listening to the Progress autocmd event. - Integrate progress ui-event with `vim._extui`.
* vim-patch:9.1.1672: completion: cannot add timeouts for 'cpt' sources (#35447)zeertzjq2025-08-24
| | | | | | | | | | | | | Problem: completion: cannot add timeouts for 'cpt' sources (Evgeni Chasnovski) Solution: Add the 'autocompletetimeout' and 'completetimeout' options (Girish Palya) fixes: vim/vim#17908 closes: vim/vim#17967 https://github.com/vim/vim/commit/69a337edc15a6c6eba6f16d2f3b7b223a149a938 Co-authored-by: Girish Palya <girishji@gmail.com>
* vim-patch:5ca1ea8: runtime(doc): Tweak documentation stylezeertzjq2025-08-23
| | | | | | | | closes: vim/vim#18078 https://github.com/vim/vim/commit/5ca1ea83ad79c8d1ebd25e61c91f1199c9bc4f09 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1638: completion: not possible to delay the autcompletionzeertzjq2025-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: completion: not possible to delay the autcompletion Solution: add the 'autocompletedelay' option value (Girish Palya). This patch introduces a new global option 'autocompletedelay'/'acl' that specifies the delay, in milliseconds, before the autocomplete menu appears after typing. When set to a non-zero value, Vim waits for the specified time before showing the completion popup, allowing users to reduce distraction from rapid suggestion pop-ups or to fine-tune the responsiveness of completion. The default value is 0, which preserves the current immediate-popup behavior. closes: vim/vim#17960 https://github.com/vim/vim/commit/a09b1604d4fe7516d87fbcbf2ffd2dc484799b23 N/A patch: vim-patch:9.1.1641: a few compiler warnings are output Co-authored-by: Girish Palya <girishji@gmail.com>
* docs: misc, dev-api-fast, $XDG_STATE_HOME #35138Justin M. Keyes2025-08-17
|
* vim-patch:9.1.1600: using diff anchors with hidden buffers fails silently ↵zeertzjq2025-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#35218) Problem: diff: using diff anchors with hidden buffers fails silently Solution: Give specific error message for diff anchors when using hidden buffers (Yee Cheng Chin). Diff anchors currently will fail to parse if a buffer used for diff'ing is hidden. Previously it would just fail as the code assumes it would not happen normally, but this is actually possible to do if `closeoff` and `hideoff` are not set in diffopt. Git's default diff tool "vimdiff3" also takes advantage of this. This fix this properly would require the `{address}` parser to be smarter about whether a particular address relies on window position or not (e.g. the `'.` address requires an active window, but `'a` or `1234` do not). Since hidden diff buffers seem relatively niche, just provide a better error message / documentation for now. This could be improved later if there's a demand for it. related: vim/vim#17615 closes: vim/vim#17904 https://github.com/vim/vim/commit/cad3b2421de7b703e0ee619850a8a3bc55454281 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:85cd509: runtime(doc): Use correct option-name tagszeertzjq2025-08-06
| | | | | | | | | | closes: vim/vim#17857 https://github.com/vim/vim/commit/85cd509885a05c3a6bb029fb378b1295f107f8f6 Omit 'completepopup' and v:colornames. Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* fix(options): make 'cdhome' take effect on any platformbfredl2025-08-03
| | | | | | | | | | | | Platform specific options are cringe and should either be fixed or deleted. In this case, the platform difference can trivially be implemented using a conditional default value. If the user overrides the value, then it is because the user wants that value, regardless of the corporation who manufactured the OS that the user is running. Possible alternative: delete the option by making it always on.
* vim-patch:9.1.1590: cannot perform autocompletion (#35141)zeertzjq2025-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot perform autocompletion Solution: Add the 'autocomplete' option value (Girish Palya) This change introduces the 'autocomplete' ('ac') boolean option to enable automatic popup menu completion during insert mode. When enabled, Vim shows a completion menu as you type, similar to pressing |i\_CTRL-N| manually. The items are collected from sources defined in the 'complete' option. To ensure responsiveness, this feature uses a time-sliced strategy: - Sources earlier in the 'complete' list are given more time. - If a source exceeds its allocated timeout, it is interrupted. - The next source is then started with a reduced timeout (exponentially decayed). - A small minimum ensures every source still gets a brief chance to contribute. The feature is fully compatible with other |i_CTRL-X| completion modes, which can temporarily suspend automatic completion when triggered. See :help 'autocomplete' and :help ins-autocompletion for more details. To try it out, use :set ac You should see a popup menu appear automatically with suggestions. This works seamlessly across: - Large files (multi-gigabyte size) - Massive codebases (:argadd thousands of .c or .h files) - Large dictionaries via the `k` option - Slow or blocking LSP servers or user-defined 'completefunc' Despite potential slowness in sources, the menu remains fast, responsive, and useful. Compatibility: This mode is fully compatible with existing completion methods. You can still invoke any CTRL-X based completion (e.g., CTRL-X CTRL-F for filenames) at any time (CTRL-X temporarily suspends 'autocomplete'). To specifically use i_CTRL-N, dismiss the current popup by pressing CTRL-E first. --- How it works To keep completion snappy under all conditions, autocompletion uses a decaying time-sliced algorithm: - Starts with an initial timeout (80ms). - If a source does not complete within the timeout, it's interrupted and the timeout is halved for the next source. - This continues recursively until a minimum timeout (5ms) is reached. - All sources are given a chance, but slower ones are de-prioritized quickly. Most of the time, matches are computed well within the initial window. --- Implementation details - Completion logic is mostly triggered in `edit.c` and handled in insexpand.c. - Uses existing inc_compl_check_keys() mechanism, so no new polling hooks are needed. - The completion system already checks for user input periodically; it now also checks for timer expiry. --- Design notes - The menu doesn't continuously update after it's shown to prevent visual distraction (due to resizing) and ensure the internal list stays synchronized with the displayed menu. - The 'complete' option determines priority—sources listed earlier get more time. - The exponential time-decay mechanism prevents indefinite collection, contributing to low CPU usage and a minimal memory footprint. - Timeout values are intentionally not configurable—this system is optimized to "just work" out of the box. If autocompletion feels slow, it typically indicates a deeper performance bottleneck (e.g., a slow custom function not using `complete_check()`) rather than a configuration issue. --- Performance Based on testing, the total roundtrip time for completion is generally under 200ms. For common usage, it often responds in under 50ms on an average laptop, which falls within the "feels instantaneous" catego