nvim: Fix cmp cmp-pandoc completion
This commit is contained in:
parent
e3b2f0f0e5
commit
ba5d5d2561
2 changed files with 14 additions and 15 deletions
|
@ -69,17 +69,24 @@ cmp.setup({
|
|||
sources = cmp.config.sources({
|
||||
{name = 'path'}, {name = 'nvim_lsp'}, {name = 'treesitter'},
|
||||
{name = 'tmux'}, {name = 'vsnip'}, {name = 'latex_symbols'},
|
||||
{name = 'pandoc_references'}, {name = 'vCard'}
|
||||
}, {{name = 'buffer'}, {name = 'spell'}})
|
||||
{name = 'cmp_pandoc'}, {name = 'vCard'}, { name = 'nvim_lua'} },
|
||||
{{name = 'buffer'}, {name = 'spell'}}
|
||||
)
|
||||
})
|
||||
require 'cmp_pandoc'.setup{
|
||||
bibliography = {
|
||||
fields = { "type", "title", "author", "date" }
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
-- Use buffer source for `/` search
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {{name = 'buffer'}}}
|
||||
)
|
||||
sources = cmp.config.sources({{name = 'buffer'}})
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' in vim
|
||||
cmp.setup.cmdline(':', {
|
||||
|
@ -87,13 +94,5 @@ cmp.setup.cmdline(':', {
|
|||
sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}})
|
||||
})
|
||||
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol
|
||||
.make_client_capabilities())
|
||||
|
|
|
@ -225,10 +225,10 @@ require("packer").startup(function()
|
|||
requires = {
|
||||
'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes
|
||||
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip',
|
||||
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
||||
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
||||
'f3fora/cmp-spell', 'jc-doyle/cmp-pandoc-references',
|
||||
'cbarrete/completion-vcard'
|
||||
'f3fora/cmp-spell', 'cbarrete/completion-vcard',
|
||||
'aspeddro/cmp-pandoc.nvim', 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' -- pandoc requires the 2 following
|
||||
}
|
||||
}
|
||||
require('plug._cmp')
|
||||
|
|
Loading…
Reference in a new issue