Replies: 4 comments 15 replies
-
Like this? #1834 You can open file first then A plugin peek line on current buffer https://github.com/nacro90/numb.nvim. |
Beta Was this translation helpful? Give feedback.
-
I’ve answered this type of request numerous times, won’t happen unless some upstream changes are implemented. |
Beta Was this translation helpful? Give feedback.
-
Quick proof of concept using Still without the previewer hack: require("fzf-lua").files({
keymap = {
fzf = {
change = "transform-search:" .. FzfLua.shell.raw_action(function(q, _, _)
q = q[1]:gsub(":%d*$", "")
return q
end, "{q}")
}
},
actions = {
enter = function(sel, opts)
local line = opts.last_query:match(":%d+$")
if line then sel[1] = sel[1] .. line end
FzfLua.actions.file_edit(sel, opts)
end
},
}) |
Beta Was this translation helpful? Give feedback.
-
Try out https://github.com/ibhagwan/fzf-lua/tree/line_query with: :FzfLua files line_query=true Notes:
Probably not much more work is needed for this but I’m on a plane and it’s been painful over ssh lol |
Beta Was this translation helpful? Give feedback.
-
I see that we have an issue where colon is preventing matches (see discussion)... I wonder if we could correct this issue, and at the same time enable jumping to the line in preview and upon opening the file.
Opening a file at a given line is a pretty common requirement when working with logs or errors, and for me personally this sort of feature has a high impact.
Note: telescope implements this like so: nvim-telescope/telescope.nvim#2791
Beta Was this translation helpful? Give feedback.
All reactions