Skip to content

Commit

Permalink
Add iswap bindings (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
dycw authored Apr 13, 2024
1 parent a871ee9 commit cf42571
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 0.1.71
current_version = 0.1.72
16 changes: 0 additions & 16 deletions lunarvim/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,10 @@ lvim.keys.normal_mode["R"] = {
-------------------------------------------------------------------------------
-- key bindings (leader)
-------------------------------------------------------------------------------
-- buffers
lvim.builtin.which_key.mappings["x"] = { "BDelete this<CR>", "Delete buffer" }

-- commands
lvim.builtin.which_key.vmappings["c"] = { "<Cmd>Telescope commands<CR>", "Commands" }

-- iswap
lvim.builtin.which_key.mappings["i"] = { "<Cmd>ISwap<CR>", "ISwap" }
lvim.builtin.which_key.mappings["iw"] = { "<Cmd>ISwapWith<CR>", "ISwapWith" }

-- lazy
lvim.builtin.which_key.mappings["lu"] = { "<Cmd>Lazy update<CR>", "Lazy update" }

-- LSP
lvim.builtin.which_key.mappings["lR"] = { "<Cmd>LspRestart<CR>", "Restart LSP" }

Expand Down Expand Up @@ -59,10 +50,3 @@ lvim.builtin.which_key.mappings["<Leader>sf"] =
lvim.builtin.which_key.vmappings["<Leader>sp"] = { "<Esc><Cmd>lua require('spectre').open_visual()<CR>", "Spectre" }
lvim.builtin.which_key.vmappings["<Leader>sf"] =
{ "<Esc><Cmd>lua require('spectre').open_file_search({select_word=true})<CR>", "Spectre (file)" }

-------------------------------------------------------------------------------
-- plugins
-------------------------------------------------------------------------------
lvim.builtin.dap.active = false
lvim.builtin.illuminate.active = false
lvim.builtin.lir.active = false
10 changes: 10 additions & 0 deletions nvim/lua/custom/plugins/iswap.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
return {
"mizlan/iswap.nvim",
config = function()
local keymap_set = require("utilities").keymap_set
local iswap = require("iswap")
keymap_set("n", "<Leader>is", function()
iswap.iswap()
end, "I[S]wap")
keymap_set("n", "<Leader>iw", function()
iswap.iswap_with()
end, "ISwap [W]ith")
end,
event = "VeryLazy",
}

0 comments on commit cf42571

Please sign in to comment.