-
Hello there. Hope you're doing well. Thank you for creating I'm wondering how to extend the same functionality but for only the current line. Basically,
Desired result: What I have Triedlocal function leap_current_line()
local current_line = vim.fn.line(".")
print(vim.inspect(current_line))
local targets = {}
-- TODO: how to search all targets on current line?
require("leap").leap({
target_windows = { vim.fn.win_getid() },
targets = targets,
})
end But I have trouble extending and finishing up the above function. Any input is much appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's doable if you don't want 2-step highlighting, but far from trivial. Otherwise you'd have to reimplement half the plugin, so it's practically impossible. For the former, you might want to check flit.nvim: |
Beta Was this translation helpful? Give feedback.
It's doable if you don't want 2-step highlighting, but far from trivial. Otherwise you'd have to reimplement half the plugin, so it's practically impossible.
For the former, you might want to check flit.nvim:
https://github.com/ggandor/flit.nvim/blob/498b3a4864e697f1ed1145e518c4c78c776c55d8/lua/flit.lua#L10
https://github.com/ggandor/flit.nvim/blob/498b3a4864e697f1ed1145e518c4c78c776c55d8/lua/flit.lua#L38
https://github.com/ggandor/flit.nvim/blob/498b3a4864e697f1ed1145e518c4c78c776c55d8/lua/flit.lua#L55