-- Jump to any position in a file with search labels, enhanced f, F, t, T motions, treesitter jumps
-- Note: this is a really great alternative to vim-sneak, lightspeed.nvim, hop.nvim and other jump plugins
-- https://github.com/folke/flash.nvim

local M = {
  "folke/flash.nvim",
  enabled = true,
  event = "VeryLazy",
  opts = {},
  keys = {
    {
      "s",
      mode = { "n", "x", "o" },
      function()
        require("flash").jump()
      end,
      desc = "Flash",
    },
    {
      "S",
      mode = { "n", "o", "x" },
      function()
        require("flash").treesitter()
      end,
      desc = "Flash Treesitter",
    },
    {
      "r",
      mode = "o",
      function()
        require("flash").remote()
      end,
      desc = "Remote Flash",
    },
    {
      "R",
      mode = { "o", "x" },
      function()
        require("flash").treesitter_search()
      end,
      desc = "Treesitter Search",
    },
  },
}

return M
