cmp-dbee icon indicating copy to clipboard operation
cmp-dbee copied to clipboard

info: Setup for using with blink.cmp

Open phdah opened this issue 11 months ago • 3 comments

If you are like me, and migrated over to blink.cmp, you can use the cmp-dbee through the blink.compat plugin. Here is how you can set it up.

require("blink-cmp").setup({
    sources = {
        default = {'lsp', 'path', 'snippets', 'buffer'},
        per_filetype = {
            -- Dbee
            sql = {'dbee', 'buffer'} -- Add any other source to include here
        },
        providers = {
            dbee = {name = 'cmp-dbee', module = 'blink.compat.source'}
    },
})

Was considering making a PR for updating the README.md, but due to the beta state of blink that is a bad idé since they have breaking changes all the time.

phdah avatar Jan 13 '25 10:01 phdah

Nice @phdah thanks! Let's open a PR at a later stage against the v2 branch.

Tested and also works for me!

MattiasMTS avatar Jan 13 '25 13:01 MattiasMTS

is this still a valid option? I can't seem to get it to work - but unsure if the plugins have just updated past this

I get the following debug log:

blink.compat completion source "cmp-dbee" has not registered itself.
 Please try enabling `impersonate_nvim_cmp` in blink.compat `opts`

joshbarrington avatar Oct 10 '25 15:10 joshbarrington

@joshbarrington yes, it works. impersonate_nvim_cmp option was deprecated, but it should work just fine without it, so long as you call setup for the cmp-dbee plugin itself. in lazy.nvim you can just add the opts = {} to it like so:

{ 'MattiasMTS/cmp-dbee', opts = {} },

edit: you also need the treesitter parser for sql edit2: and make sure that it actually loads when you need your completions. put it as a dependency of blink.cmp or load it on sql file type or just don't lazy load it at all

noby-y avatar Nov 25 '25 10:11 noby-y