-- grapple.lua: Manages and switches between workspace tags for project organization.

return {
  "cbochs/grapple.nvim",
  event = { "BufReadPost", "BufNewFile" },
  dependencies = { "nvim-lua/plenary.nvim" },
  keys = {
    { "<leader>m", "<cmd>Grapple toggle<cr>", desc = "Grapple: toggle file" },
    { "<leader>M", "<cmd>Grapple toggle_tags<cr>", desc = "Grapple: open tag menu" },
    { "<leader>1", "<cmd>Grapple select index=1<cr>", desc = "Grapple: goto tag 1" },
    { "<leader>2", "<cmd>Grapple select index=2<cr>", desc = "Grapple: goto tag 2" },
    { "<leader>3", "<cmd>Grapple select index=3<cr>", desc = "Grapple: goto tag 3" },
    { "<leader>4", "<cmd>Grapple select index=4<cr>", desc = "Grapple: goto tag 4" },
  },
  opts = {
    scope = "git", -- per-branch scope
    quick_select = "123456789",
  },
}
