From d399535495a162b870783113be9aa7a8fd6175c6 Mon Sep 17 00:00:00 2001 From: ammon134 Date: Thu, 28 Mar 2024 20:35:01 +0700 Subject: [PATCH] feat(extras): use mini.move instead of native move --- .../plugins/extras/editor/mini-move.lua | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/mini-move.lua diff --git a/lua/lazyvim/plugins/extras/editor/mini-move.lua b/lua/lazyvim/plugins/extras/editor/mini-move.lua new file mode 100644 index 00000000..96cd129a --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/mini-move.lua @@ -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] = { + "", + mode = { "i", "n" }, + function() + move.move_line(dir) + end, + } + end + for i, dir in ipairs(directions) do + ret[#ret + 1] = { + "", + mode = { "v" }, + function() + move.move_selection(dir) + end, + } + end + return ret + end, + }, +}