Adding search results to search registry for n
/N
#1632
-
Hello! I was wondering if it's possible to configure fzf-lua s.t. live_grep search results are added to the search register for easy navigation with The following is my attempt to translate cycling files into cycling results, but it just tells me that true isn't a valid option. local map = vim.keymap.set
-- ... other mappigns
map("n", "/", function()
require("fzf-lua").grep_curbuf({ fzf_opts = { ["--cycle"] = "true" } })
end) Thank you to anyone reading this! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I’m not sure I understand what you’re after, I think you mean search history but I don’t get how this is related to cycle? Is this what you want? |
Beta Was this translation helpful? Give feedback.
It's lua and neovim and me just assuming what would work and typing it from the phone :-)
Tested and this works, can't guarantee edge cases you might need to debug this with special chars (although the magic pattern converter should do the trick), there probably is also a better way than manually feeding
/regex<CR>N
as keys butvim.fn.search
orvim.regex:match_line
didn't seem to do the trick, I also triedvim.fn.histadd("search", regex)
- didn'…