info: Setup for using with blink.cmp
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.
Nice @phdah thanks! Let's open a PR at a later stage against the v2 branch.
Tested and also works for me!
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 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