From 8f1fb60f0a78cb2e83b485e1f946822812c5ff50 Mon Sep 17 00:00:00 2001 From: ammon134 <113684938+ammon134@users.noreply.github.com> Date: Fri, 29 Mar 2024 05:49:48 +0700 Subject: [PATCH] feat(extras): use mini.move instead of native move (#2865) --- .../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, + }, +}