2022-09-12 13:48:29 +02:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
function M.setup()
|
2022-10-09 03:28:51 +02:00
|
|
|
local opts = function(desc)
|
|
|
|
return {
|
|
|
|
desc = desc,
|
|
|
|
silent = true
|
|
|
|
}
|
|
|
|
end
|
2022-10-13 01:05:38 +02:00
|
|
|
vim.keymap.set({ "n", "v", "o" }, "qf", "<Plug>(easymotion-bd-f)", opts("Hop to char"))
|
|
|
|
vim.keymap.set({ "n", "v", "o" }, "qj", "<Plug>(easymotion-overwin-f2)", opts("Hop to char pair"))
|
|
|
|
vim.keymap.set({ "n", "v", "o" }, "qw", ":silent <Plug>(easymotion-bd-w)", opts("Hop to word"))
|
|
|
|
vim.keymap.set({ "n", "v", "o" }, "qL", "silent <Plug>(easymotion-bd-L)", opts("Hop to line (?)"))
|
2022-10-09 03:28:51 +02:00
|
|
|
|
|
|
|
local status, wk = pcall(require, "which-key")
|
|
|
|
|
|
|
|
if status then
|
|
|
|
wk.register({
|
|
|
|
q = {
|
|
|
|
name = "Easymotion"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
2022-09-12 13:48:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|