Skip to content

Commit

Permalink
feat(full-dadbod): configure autocmds in AstroCore
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Mar 1, 2024
1 parent 81b29a8 commit 1d14441
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions lua/astrocommunity/pack/full-dadbod/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ return {
dependencies = {
{
"kristijanhusak/vim-dadbod-completion",
init = function()
vim.api.nvim_create_autocmd("FileType", {
desc = "dadbod completion",
group = vim.api.nvim_create_augroup("dadbod_cmp", { clear = true }),
pattern = { "sql", "mysql", "plsql" },
callback = function() require("cmp").setup.buffer { sources = { { name = "vim-dadbod-completion" } } } end,
})
end,
dependencies = {
"AstroNvim/astrocore",
opts = {
autocmds = {
dadbod_cmp = {
{
event = "FileType",
desc = "dadbod completion",
pattern = { "sql", "mysql", "plsql" },
callback = function()
require("cmp").setup.buffer { sources = { { name = "vim-dadbod-completion" } } }
end,
},
},
},
},
},
},
},
},
Expand Down

0 comments on commit 1d14441

Please sign in to comment.