Skip to content

Commit

Permalink
fix(leap-nvim): duplicate cursor when leaping (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSast authored Jul 11, 2023
1 parent 360d42b commit 45ae8f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/astrocommunity/motion/leap-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ return {
{ "gs", "<Plug>(leap-from-window)", mode = { "n", "x", "o" }, desc = "Leap from window" },
},
opts = {},
init = function() -- https://github.com/ggandor/leap.nvim/issues/70#issuecomment-1521177534
vim.api.nvim_create_autocmd("User", {
callback = function()
vim.cmd.hi("Cursor", "blend=100")
vim.opt.guicursor:append { "a:Cursor/lCursor" }
end,
pattern = "LeapEnter",
})
vim.api.nvim_create_autocmd("User", {
callback = function()
vim.cmd.hi("Cursor", "blend=0")
vim.opt.guicursor:remove { "a:Cursor/lCursor" }
end,
pattern = "LeapLeave",
})
end,
dependencies = {
"tpope/vim-repeat",
},
Expand Down

0 comments on commit 45ae8f9

Please sign in to comment.