From cdf17c171ba8a28f49b47a4b3d23fe7b490b6492 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 19 Jan 2024 23:13:23 +0100 Subject: [PATCH] leap keys --- lua/custom/mappings.lua | 49 ++++++++++++++++++++++++++++++++++++++++- lua/custom/plugins.lua | 19 +++++++++++++++- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 8edbd20..5a231fa 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -8,6 +8,53 @@ M.disabled = { [""] = "", [""] = "", }, + v = {}, +} + +M.leap = { + plugin = false, + n = { + ["s"] = { + "(leap-forward)", + "leap forward", + }, + ["S"] = { + "(leap-backward)", + "leap backward", + }, + ["gs"] = { + "(leap-from-window)", + "leap from window", + }, + }, + x = { + ["s"] = { + "(leap-forward)", + "leap forward", + }, + ["S"] = { + "(leap-backward)", + "leap forward", + }, + ["gs"] = { + "(leap-from-window)", + "leap from window", + }, + }, + o = { + ["s"] = { + "(leap-forward)", + "leap forward", + }, + ["S"] = { + "(leap-backward)", + "leap forward", + }, + ["gs"] = { + "(leap-from-window)", + "leap from window", + }, + }, } M.lazygit = { @@ -117,7 +164,7 @@ M.edit = { n = { -- easy newline ["OO"] = { "O", "insert a line above", opts = { nowait = false } }, - ["oo"] = { "o", "insert a line below", opts = { nowait = false } }, + ["ll"] = { "o", "insert a line below", opts = { nowait = false } }, -- split and join lines ["jj"] = { " join ", "join lines" }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 1ea2cbc..60e00f4 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -48,12 +48,29 @@ local plugins = { }, { "ggandor/leap.nvim", + lazy = false, config = function() - require("leap").create_default_mappings() + require("core.utils").load_mappings "leap" + end, + }, + { + "ggandor/flit.nvim", + lazy = false, + config = function() + require("flit").setup { + keys = { f = "f", F = "F", t = "t", T = "T" }, + -- A string like "nv", "nvo", "o", etc. + labeled_modes = "v", + multiline = true, + -- Like `leap`s similar argument (call-specific overrides). + -- E.g.: opts = { equivalence_classes = {} } + opts = {}, + } end, }, { "kdheepak/lazygit.nvim", + lazy = false, keys = { "gg" }, cmd = "LazyGit", -- optional for floating window border decoration