/compe-lbdb

lbdb completion source for nvim-compe

Primary LanguageLuaMIT LicenseMIT

compe-lbdb

lbdb completion source for nvim-compe. Names, emails, and email header recipient formatted completions are provided for contacts found in lbdb.

screenshot

Installation

Use your favorite plugin manager:

  • vim-plug
    Plug 'codybuell/compe-lbdb'
  • pathogen
    git clone https://github.com/codybuell/compe-lbdb.git ~/.config/nvim/bundle/compe-lbdb
  • native package manager
    git clone https://github.com/codybuell/compe-lbdb.git ~/.config/nvim/pack/bundle/opt/compe-lbdb
    packadd! compe-lbdb

Usage

-- setup with defaults (markdown and mail file types, priority 100)
require('compe').setup({
  -- snip...
  source = {
    -- snip...
    lbdb = true,
    -- snip...
  }
})

-- or alternatively, enable with overrides
require('compe').setup({
  -- snip...
  source = {
    -- snip...
    lbdb = {
      priority = 80,
      filetypes = {'mail'},
      blacklist = {
        'user@host.com',
        '.*noreply.*',
      },
    },
    -- snip...
  }
})

Note that if you are configuring your own blacklist it will not be picked up if compe is initialized in an after script.