Skip to content

Commit

Permalink
feat(motion): add leap/flit.nvim plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
taskylizard authored and luxus committed Mar 21, 2023
1 parent c0b272d commit cdc2107
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/astrocommunity/motion/leap-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# flit.nvim

**Repository:** https://github.com/ggandor/leap.nvim

:kangaroo: Neovim's answer to the mouse

This also includes [flit.nvim](https://github.com/ggandor/flit.nvim).
29 changes: 29 additions & 0 deletions lua/astrocommunity/motion/leap-nvim/leap-nvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
return {
{
"ggandor/flit.nvim",
keys = function()
---@type LazyKeys[]
local ret = {}
for _, key in ipairs { "f", "F", "t", "T" } do
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
end
return ret
end,
opts = { labeled_modes = "nx" },
dependencies = {
"ggandor/leap.nvim",
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
},
config = function(_, opts)
local leap = require "leap"
for k, v in pairs(opts) do
leap.opts[k] = v
end
leap.add_default_mappings(true)
end,
},
},
}

0 comments on commit cdc2107

Please sign in to comment.