dotfiles/nvim/lua/custom/plugins/dadbod.lua

24 lines
612 B
Lua

-- UI for working with databases from within vim.
-- https://github.com/tpope/vim-dadbod
-- https://github.com/kristijanhusak/vim-dadbod-ui
return {
'tpope/vim-dadbod',
dependencies = {
'kristijanhusak/vim-dadbod-ui',
'kristijanhusak/vim-dadbod-completion',
},
config = function()
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'sql', 'mysql', 'plsql' },
desc = 'Add dadbod-completion',
callback = function()
require('cmp').setup.buffer {
sources = {
{ name = 'vim-dadbod-completion' },
},
}
end,
})
end,
}