nvim: Add bibtex source to cmp autocompletion
Added simple bibtex source display: Will show the bibtex entries existing in the bib file set through `bibliography: path/to/mine.bib`. Shows author, title, date on hovering.
This commit is contained in:
parent
df724c20ba
commit
565a356ea8
2 changed files with 9 additions and 2 deletions
|
@ -68,14 +68,17 @@ cmp.setup({
|
|||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }, { name = 'nvim_lsp' }, { name = 'treesitter' },
|
||||
{ name = 'tmux' }, { name = 'vsnip' }, { name = 'latex_symbols' },
|
||||
{ name = 'vCard' }, { name = 'nvim_lua' }
|
||||
{ name = 'cmp_pandoc' }, { name = 'tmux' }, { name = 'vsnip' },
|
||||
{ name = 'latex_symbols' }, { name = 'vCard' }, { name = 'nvim_lua' }
|
||||
}, { { name = 'buffer' }, { name = 'spell' } })
|
||||
})
|
||||
|
||||
if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft ==
|
||||
'guihua_rust' then require 'cmp'.setup.buffer { completion = { enable = false } } end
|
||||
|
||||
-- set up pandoc bibtex source generation
|
||||
require 'cmp_pandoc'.setup()
|
||||
|
||||
-- Use buffer source for `/` search
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
|
|
|
@ -236,6 +236,10 @@ require("packer").startup(function()
|
|||
|
||||
}
|
||||
}
|
||||
use {
|
||||
'aspeddro/cmp-pandoc.nvim',
|
||||
requires = {'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim'}
|
||||
}
|
||||
require('plug._cmp')
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
|
|
Loading…
Reference in a new issue