summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/extra/hop.lua
blob: 834f97aa370d46c527d8de6e465cec2b92914aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local M = {}
local Log = require "core.log"

M.config = function()
  local status_ok, hop = pcall(require, "hop")
  if not status_ok then
    Log:get_default().error "Failed to load hop"
    return
  end
  hop.setup()
  vim.api.nvim_set_keymap("n", "s", ":HopChar2<cr>", { silent = true })
  vim.api.nvim_set_keymap("n", "S", ":HopWord<cr>", { silent = true })
end

return M