Skip to content

Commit

Permalink
feat(extras): use mini.move instead of native move (#2865)
Browse files Browse the repository at this point in the history
  • Loading branch information
quangd42 committed Mar 28, 2024
1 parent e29c7ac commit 8f1fb60
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions lua/lazyvim/plugins/extras/editor/mini-move.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
return {
{
"echasnovski/mini.move",
event = "VeryLazy",
opts = {},
keys = function()
local ret = {}
local directions = { "left", "down", "up", "right" }
local keys = { "h", "j", "k", "l" }
local move = require("mini.move")
for i, dir in ipairs(directions) do
ret[#ret + 1] = {
"<A-" .. keys[i] .. ">",
mode = { "i", "n" },
function()
move.move_line(dir)
end,
}
end
for i, dir in ipairs(directions) do
ret[#ret + 1] = {
"<A-" .. keys[i] .. ">",
mode = { "v" },
function()
move.move_selection(dir)
end,
}
end
return ret
end,
},
}

0 comments on commit 8f1fb60

Please sign in to comment.