cmp-dbee
cmp-dbee copied to clipboard
Unable to get completion working
Hello,
I'm unable to get completion working. Lazy shows the plugin as loaded, but running :Cmpstatus shows cmp-dbee under "unknown source names".
My configuration can be found here https://github.com/kade5/kickstart.nvim/tree/dbee and my nvim-cmp configuration is on lines 653 to 770 in init.lua. See below.
I was able to get completion working using commit 0feabc1, but it doesn't work starting with commit 67976ff.
{ -- Autocompletion
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
{
'L3MON4D3/LuaSnip',
build = (function()
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
},
},
'saadparwaiz1/cmp_luasnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
{
'MattiasMTS/cmp-dbee',
commit = '0feabc1', --completion works using this commit
dependencies = {
{ 'kndndrj/nvim-dbee' },
},
ft = 'sql',
},
},
config = function()
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = 'menu,menuone,noinsert' },
mapping = cmp.mapping.preset.insert {
-- Select the [n]ext item
['<C-n>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(),
-- Scroll the documentation window [b]ack / [f]orward
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-y>'] = cmp.mapping.confirm { select = true },
['<C-Space>'] = cmp.mapping.complete {},
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'cmp-dbee' },
},
}
end,
},