Skip to content

Live filter files picker to subdirectory? #1402

Answered by ibhagwan
heygarrett asked this question in Q&A
Discussion options

You must be logged in to vote

The error refers to an auto-command I have configured in a different file (for some reason):

Fzf-Lua sets the file type to fzf so it also triggers the auto command, you should probably add it to the exclude list.

Another option is to reuse the existing fzf-lua windows by wrapping the action in {}:

["ctrl-f"] = { function(selected)
	local relative_path = require("fzf-lua.path").entry_to_file(selected[1]).stripped
        -- this line won’t be needed
	-- vim.api.nvim_input("<esc>")
	require("fzf-lua").files({ cwd = vim.fs.joinpath(vim.env.PWD, relative_path) })
end },

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@heygarrett
Comment options

@ibhagwan
Comment options

@heygarrett
Comment options

@heygarrett
Comment options

@ibhagwan
Comment options

Answer selected by heygarrett
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