diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index b36802b..b64819e 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -84,7 +84,21 @@ return { cmdline_history = { name = 'cmdline_history', module = 'blink.compat.source', - } + }, + buffer = { + name = 'Buffer', + module = 'blink.cmp.sources.buffer', + opts = { + -- default to all visible buffers + get_bufnrs = function() + return vim + .iter(vim.api.nvim_list_wins()) + :map(function(win) return vim.api.nvim_win_get_buf(win) end) + :filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) + :totable() + end, + } + }, }, },