feat(nvim): enable vim-dadbod-completion in cmp

This commit is contained in:
Price Hiller 2023-11-03 15:19:35 -05:00
parent 0f94203abb
commit ca722523c3
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
2 changed files with 7 additions and 0 deletions

View File

@ -137,7 +137,10 @@ return {
---@param entry cmp.Entry
---@param vim_item vim.CompletedItem
format = function(entry, vim_item)
-- vim.notify(vim.inspect(entry))
local selections = {
["vim-dadbod-completion"] = { symbol = "󰆼 ", name = "DB", hl_group = "DadbodCompletion" },
fuzzy_buffer = { symbol = "󰱼 ", name = "Buffer", hl_group = "Buffer" },
calc = { symbol = "", name = "Calculator", hl_group = "Calculator" },
orgmode = { symbol = "", name = "Org", hl_group = "Orgmode" },
@ -342,6 +345,9 @@ return {
}),
})
cmp.setup.filetype("sql", { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 99 } }) })
cmp.setup.filetype("mysql", { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 99 } }) })
cmp.setup.filetype("plsql", { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 99 } }) })
cmp.setup.filetype("toml", { sources = standard_sources({ { name = "crates" } }) })
cmp.setup.filetype("org", { sources = standard_sources({ { name = "orgmode", priority = 99 } }) })

View File

@ -107,6 +107,7 @@ return {
CmpItemKindColor = { fg = colors.fujiWhite, bg = colors.waveAqua2 },
CmpItemKindTypeParameter = { fg = colors.fujiWhite, bg = colors.waveAqua2 },
CmpCustomSelectionColor = { bg = colors.sumiInk5 },
CmpCustomSelectionDadbodCompletion = { fg = colors.fujiWhite, bg = colors.oniViolet },
CmpCustomSelectionGit = { fg = colors.fujiWhite, bg = colors.roninYellow },
CmpCustomSelectionBuffer = { fg = colors.fujiWhite, bg = colors.dragonBlue },
CmpCustomSelectionPath = { fg = colors.fujiWhite, bg = colors.autumnYellow },