feat(extras): use mini.move instead of native move (#2865)
This commit is contained in:
32
lua/lazyvim/plugins/extras/editor/mini-move.lua
Normal file
32
lua/lazyvim/plugins/extras/editor/mini-move.lua
Normal file
@ -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,
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user