Comments (12)
I cannot reproduce, the problem is not with this mapping itself, it should work.
from leap.nvim.
Sure, but I don't fully understand the problem (what Lazy is doing in the background), and cannot really follow the comment in your code snippet, so please walk me through this then.
from leap.nvim.
@Sleepful This would only work with the first leap. On the second leap it shows:
E5108: Error executing lua: ~/.local/share/nvim/lazy/leap.nvim/lua/leap/main.lua:405: attempt to index local '_local_67_' (a nil value)
stack traceback:
~/.local/share/nvim/lazy/leap.nvim/lua/leap/main.lua:405: in function 'leap'
~/.config/nvim/lua/plugins/leap.lua:11: in function <~/.config/nvim/lua/plugins/leap.lua:10>
```
from leap.nvim.
see LazyVim/LazyVim#2379 (comment) for solution
from leap.nvim.
TL;DR: don't use keys
, it's unnecessary.
from leap.nvim.
Right, thanks for confirming that!
from leap.nvim.
I just narrowed down the issue I had,fyi this is triggered by setting it like this:
require('lazy').setup({
{
'ggandor/leap.nvim',
keys = {'s'}
-- with this keys lazy loading option,
-- at each leap it calls lua/leap/main.lua: line 1202
-- it also depends on the
-- and it will get reset to default vim s key
}
})
vim.keymap.set({ 'n', 'x', 'o' }, 's', function()
local current_window = vim.fn.win_getid()
require('leap').leap({ target_windows = { current_window } })
end, { noremap = true})
Despite said here in the readme that lazy loading isn't necessary, there would potentially still be people like me who interpret the wording as lazy loading leap wouldn't result in unexpected behavior(s). Would it be possible to state this somewhere?
from leap.nvim.
@ggandor sorry for the ping, I forgot to reopen the issue. Could you please take another look?
from leap.nvim.
So the problem I had was lazy would reset the keybinds when I use the lazy load on keypress option, if I decided to disable the default keymaps and only map s/S
to leap actions. Those keybinds get reset to the vim s/S after the first leap action
from leap.nvim.
did you try this?
require('lazy').setup({
{
'ggandor/leap.nvim',
keys = {
"s",
function()
require('leap').leap()
end,
mode = { "x", "n" },
desc = "Leap",
}
}
})
from leap.nvim.
Did anyone find a solution to this?
from leap.nvim.
I will close it since it's not a leap issue
from leap.nvim.
Related Issues (20)
- Set vim.g.loaded_leap = 1 when plugin loaded HOT 2
- Config example for bidirectional search HOT 2
- Repeat mappings: leap backward will suddenly only leap forward HOT 8
- The jump position key if starts with a vim motion it would trigger the motion after jumping to that postion HOT 4
- [Bug]Newest branch break leap() function with pos targets HOT 1
- Error detected while processing User Autocommands for "LeapEnter": HOT 2
- Option to disable autojump behavior **completely** HOT 1
- Initial label not showing properly HOT 1
- Allow traversing directionally after bidirectional search HOT 3
- [Feature Request] Limit highlights to beginning or end of word HOT 4
- Readme suggestion : add link to usage in tldr how it works
- Dot repeat not working HOT 5
- Random crashes occuring HOT 15
- Cursor Not Moving with s{char}{label} in init.vim Configuration HOT 2
- Show label at first match char HOT 3
- illuminate.nvim does not refresh highlights after autojump HOT 14
- Disable special keys (lightspeed.nvim compatibility) HOT 1
- Conflict with lazy.nvim's default mappings HOT 3
- Unable to define custom trigger key in NvChad (lazy.vim) HOT 2
- <CR> after the auto jump results in additional movement HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leap.nvim.