local snippy_id = vim.api.nvim_create_augroup("snippy", { clear = true })

vim.api.nvim_create_autocmd("CompleteDone", {
  group    = snippy_id,
  callback = function()
    require("snippy").complete_done()
  end,
})

require("snippy").setup({
  mappings = {
    is = {
      ["<tab>"]   = "next",
      ["<s-tab>"] = "previous",
    },
  },
})

vim.keymap.set('i', '<C-x><C-u>', '<cmd>lua require(\'snippy\').complete()<CR>', { noremap = true, unique = true, silent = true })
