diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 8edbd20..cc866b7 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -8,6 +8,53 @@ M.disabled = { [""] = "", [""] = "", }, + v = {}, +} + +M.leap = { + plugin = true, + 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 = { @@ -120,7 +167,9 @@ M.edit = { ["oo"] = { "o", "insert a line below", opts = { nowait = false } }, -- split and join lines - ["jj"] = { " join ", "join lines" }, + -- "J" for join is defaul + ["S"] = { + "ik", "split line"}, -- do something useful with the arrows [""] = { " move-2", "Move line up", opts = { expr = true } }, 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