From e43a76a132c88820b0d9c504667b28c90ee6ef31 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 5 Nov 2023 06:44:33 +0100 Subject: [PATCH] Feat(nvim): add option for buffer completion --- nvim/.config/nvim/lua/plugins/completion.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/completion.lua b/nvim/.config/nvim/lua/plugins/completion.lua index 6b129fd..19a0bb7 100644 --- a/nvim/.config/nvim/lua/plugins/completion.lua +++ b/nvim/.config/nvim/lua/plugins/completion.lua @@ -25,7 +25,15 @@ return { { name = 'nvim_lsp' }, { name = 'vsnip' }, -- For vsnip users. { name = 'path' }, - { name = 'buffer' }, + { + name = 'buffer', + option = { + keyword_length = 3, + get_bufnrs = function() + return vim.api.nvim_list_bufs() + end + } + }, }, { { name = 'buffer' }, })