aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_editor.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-05-31 17:36:25 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-06-03 06:30:47 +0800
commitb6acf6112bf6c9990956c14940e3bc41a2e27e65 (patch)
treedf2f016088ea266079c9c73d42fed9af0c333b2f /runtime/lua/vim/_editor.lua
parentc249389adb8a02faf1752e8762ee3ee7d6377212 (diff)
downloadrneovim-b6acf6112bf6c9990956c14940e3bc41a2e27e65.tar.gz
rneovim-b6acf6112bf6c9990956c14940e3bc41a2e27e65.tar.bz2
rneovim-b6acf6112bf6c9990956c14940e3bc41a2e27e65.zip
vim-patch:9.1.1311: completion: not possible to limit number of matches
Problem: completion: not possible to limit number of matches Solution: allow to limit the matches for 'complete' sources by using the "{flag}^{limit}" notation (Girish Palya) This change extends the 'complete' option to support limiting the number of matches returned from individual completion sources. **Rationale:** In large files, certain sources (such as the current buffer) can generate an overwhelming number of matches, which may cause more relevant results from other sources (e.g., LSP or tags) to be pushed out of view. By specifying per-source match limits, the completion menu remains balanced and diverse, improving visibility and relevance of suggestions. A caret (`^`) followed by a number can be appended to a source flag to specify the maximum number of matches for that source. For example: ``` :set complete=.^9,w,u,t^5 ``` In this configuration: - The current buffer (`.`) will return up to 9 matches. - The tag completion (`t`) will return up to 5 matches. - Other sources (`w`, `u`) are not limited. This feature is fully backward-compatible and does not affect behavior when the `^count` suffix is not used. The caret (`^`) was chosen as the delimiter because it is least likely to appear in file names. closes: vim/vim#17087 https://github.com/vim/vim/commit/0ac1eb3555445f4c458c06cef7c411de1c8d1020 Cherry-pick test_options.vim change from patch 9.1.1325. Co-authored-by: Girish Palya <girishji@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
0 files changed, 0 insertions, 0 deletions