lbdb completion source for nvim-cmp. Names, emails, and email header recipient formatted completions are provided for contacts found in lbdb.
Use your favorite plugin manager:
-
Plug 'codybuell/cmp-lbdb'
-
git clone https://github.com/codybuell/cmp-lbdb.git ~/.config/nvim/bundle/cmp-lbdb
-
native package manager
git clone https://github.com/codybuell/cmp-lbdb.git ~/.config/nvim/pack/bundle/opt/cmp-lbdb
packadd! cmp-lbdb
-- setup with defaults (markdown and mail file types)
require('cmp').setup({
-- snip...
sources = {
-- snip...
{ name = lbdb },
-- snip...
}
})
-- or alternatively, enable with overrides
require('cmp').setup({
-- snip...
sources = {
-- snip...
{
name = 'lbdb',
filetypes = { 'mail', 'markdown', 'gitcommit' }
blacklist = {
'user@host.com',
'.*noreply.*',
},
},
-- snip...
}
})
Default: { 'mail', 'markdown' }
Sets what filetypes the completion source will be made available.
Default: { '.*not?.?reply.*' }
The blacklist sets what emails to exclude from the completion list. The default value will catch variations of noreply
, no-reply
, do-not-reply
, and so on. Lua pattern matching can be used.