Closed illia-danko closed 1 year ago
Found a workaround: lua require'fzf-lua'.files({ cmd = vim.env.FZF_DEFAULT_COMMAND })
and it satisfies my usage.
Found a workaround:
lua require'fzf-lua'.files({ cmd = vim.env.FZF_DEFAULT_COMMAND })
and it satisfies my usage.
That’s correct usage, the FZF_DEFAULT_COMMAND
will never be used unless you use fzf_exec
with no arguments, the use of the cmd
argument is the recommended way.
I use ripgrep in FZF_DEFAULT_COMMAND environment variable as a base search command, mostly for filtering out unneeded directories:
export FZF_DEFAULT_COMMAND="rg --files --hidden -g '!{.git,.svn,.hg,CVS,.bzr,vendor,node_modules,dist,venv,elm-stuff,.clj-kondo,.lsp}'"
However fzf-lua seems to ignore the
--hidden
setting or use entirely a different command thanrg
.How to teach fzf-lua.files to respect FZF_DEFAULT_COMMAND environment variable? Found some manipulation of FZF_DEFAULT_COMMAND inside the plugin code, but haven't followed what's going on there.