Skip to content

how to foramtter display path? #1227

Answered by ibhagwan
mycf asked this question in Q&A
May 30, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Fzf-lua uses an external process, therefore all the data has to be contained within the line, for what you’re after you’ll need a custom formatter that duplicates the full path/symbol data and then hide the metadata with --with-nth.

You might be able to hack your way with _fmt.to and _fmt.from:

from = function(s, _)
-- restore the format to something that `path.entry_to_file` can
-- handle more robustly, while this can still work due to the `utils.nbsp`
-- it will fail when the symbol contains "[%d]" (which we use as bufnr)
local text, file = s:match(string.format("^(.-)%s(.*)", utils.nbsp))
r…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mycf
Comment options

@ibhagwan
Comment options

Answer selected by ibhagwan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants