local ls = require("luasnip")
local types = require("luasnip.util.types")

-- Every unspecified option will be set to the default.
ls.setup({
  history = true,

  -- Update more often, :h events for more info.
  update_events = "TextChanged,TextChangedI",
  -- Snippets aren't automatically removed if their text is deleted.
  -- `delete_check_events` determines on which events (:h events) a check for
  -- deleted snippets is performed.
  -- This can be especially useful when `history` is enabled.
  delete_check_events = "TextChanged",
  ext_opts = {
    [types.choiceNode] = {
      active = {
        virt_text = { { "<--", "Error" } },
      },
    },
  },
})

require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
