Skip to content

Commit 8fb1eb1

Browse files
committed
docs: fix buffer option descriptions
1 parent bae4bae commit 8fb1eb1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/configuration/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ sources.providers = {
585585
end,
586586
-- buffers when searching with `/` or `?`
587587
get_search_bufnrs = function() return { vim.api.nvim_get_current_buf() } end,
588-
-- Maximum total number of characters (across all selected buffers) for which buffer completion runs synchronously. Above this, asynchronous processing is used.
588+
-- Maximum total number of characters (in an individual buffer) for which buffer completion runs synchronously. Above this, asynchronous processing is used.
589589
max_sync_buffer_size = 20000,
590-
-- Maximum total number of characters (across all selected buffers) for which buffer completion runs asynchronously. Above this, buffer completions are skipped to avoid performance issues.
590+
-- Maximum total number of characters (in an individual buffer) for which buffer completion runs asynchronously. Above this, the buffer will be skipped.
591591
max_async_buffer_size = 200000,
592592
-- Maximum text size across all buffers (default: 500KB)
593593
max_total_buffer_size = 500000,

lua/blink/cmp/sources/buffer/init.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ local dedup = require('blink.cmp.lib.utils').deduplicate
1111
--- @class blink.cmp.BufferOpts
1212
--- @field get_bufnrs fun(): integer[]
1313
--- @field get_search_bufnrs fun(): integer[]
14-
--- @field max_sync_buffer_size integer Maximum buffer text size for sync processing
15-
--- @field max_async_buffer_size integer Maximum buffer text size for async processing
16-
--- @field max_total_buffer_size integer Maximum text size across all buffers
14+
--- @field max_sync_buffer_size integer Maximum total number of characters (in an individual buffer) for which buffer completion runs synchronously. Above this, asynchronous processing is used.
15+
--- @field max_async_buffer_size integer Maximum total number of characters (in an individual buffer) for which buffer completion runs asynchronously. Above this, the buffer will be skipped.
16+
--- @field max_total_buffer_size integer Maximum text size across all buffers (default: 500KB)
1717
--- @field retention_order string[] Order in which buffers are retained for completion, up to the max total size limit
1818
--- @field use_cache boolean Cache words for each buffer which increases memory usage but drastically reduces cpu usage. Memory usage depends on the size of the buffers from `get_bufnrs`. For 100k items, it will use ~20MBs of memory. Invalidated and refreshed whenever the buffer content is modified.
19-
--- @field enable_in_ex_commands boolean Whether to enable buffer source in substitute (:s) and global (:g) commands
19+
--- @field enable_in_ex_commands boolean Whether to enable buffer source in substitute (:s) and global (:g) commands. Note: Enabling this option will temporarily disable Neovim's 'inccommand' feature while editing Ex commands, due to a known redraw issue (see neovim/neovim#9783). This means you will lose live substitution previews when using :s, :smagic, or :snomagic while buffer completions are active.
2020

2121
--- @param words string[]
2222
--- @return blink.cmp.CompletionItem[]

0 commit comments

Comments
 (0)