Closed nikbrunner closed 4 months ago
@nikbrunner, is the debug output from when the command fails (when prompt is not commented)?
I’m confused because I don’t see prompt:…
as part of the --color
string, very strange error message and issue but rest assured we’ll get to the bottom of this :)
@nikbrunner, is the debug output from when the command fails (when prompt is not commented)?
I’m confused because I don’t see
prompt:…
as part of the--color
string, very strange error message and issue but rest assured we’ll get to the bottom of this :)
Yeah the first time it was without the prompt
commented in. I forgot about that. 🤦 I updated the description. The first is without the prompt
and the second one with.
Ok now this makes sense, definitely a bug, look at the second output --color 'query:#998ed9,formatter:path.filename_first,…
.
Ty @nikbrunner! I’ll fix this in a couple of hours.
https://github.com/ibhagwan/fzf-lua/commit/c8a73993708b91fe565199705bd3d28b9a16ffad
@nikbrunner, should work as expected now.
It works! Perfect. Thank you so much (again). 😁 I don't know the code base of course, but the fix is very interesting.
It works! Perfect. Thank you so much (again). 😁 I don't know the code base of course, but the fix is very interesting.
It's a long story, not that long ago I replaced the way globals are acquired to be able to better accomodate option overrides (fzf-lua accepts overrides from anywhere, setup, setup.defaults, call options, :FzfLua command, etc), I somewhat arbitrarily decided that any table that contains prompt
is a picker and needs to have setup.defaults
merged into it, obviously that "logic" came back to bite me lol, now changed to anything that has actions
lol, simple and works until it doesn't lol
Actually it did come to bite me already lol, the defaults
weren't being applied to oldfiles
as it inherits actions from files
https://github.com/ibhagwan/fzf-lua/commit/e627782478a3f8bd6e766b39c40631f60a1b66ba
Very interesting. It is good that I noticed it and you were able to solve it. 😁 I love the new new previewer. Thank you again. 🙏
RTFM Checklist
man fzf
/ I am well versed in shell fzfOperating system
Mac OS
Shell
zsh
Neovim version (
nvim --version
)NVIM v0.9.5
Fzf version (
fzf --version
)0.50.0 (brew)
Output of
:lua print(os.getenv('FZF_DEFAULT_OPTS'))
--bind 'ctrl-e:execute(echo {+} | xargs -o nvim)'
Is the problem reproducible with
mini.sh
?mini.sh
mini.sh
mini.sh
(not relevant, requires LSP, Windows, etc)Fzf-lua configuration
Describe the bug / steps to reproduce
Referenced discussion: https://github.com/ibhagwan/fzf-lua/issues/1051#issuecomment-2094812996
When I set the
defaults = { formatter = "path.filename_first" }
and also have thefzf_colors.prompt
set, I will get an error:I found this in the repo and I guessed it has something todo with the fzf colors.
fzf_colors
array and stopped atprompt
. If I comment it out I no longer get the error.fzf_colors.prompt
back in.Already requested ouptut from my side
:lua vim.print(vim.api.nvim_get_hl(0,{name="Conditional"}))
{ bold = true, cterm = { bold = true, italic = true }, fg = 10063577, italic = true }
:FzfLua files debug=true _base64=false formatter=path.filename_first
[Fzf-lua]: FZF_DEFAULT_COMMAND: VIMRUNTIME='/opt/homebrew/Cellar/neovim/0.9.5/share/nvim/runtime' '/opt/homebrew/Cellar/neovim/0.9.5/bin/nvim' -n --headless --clean --cmd 'lua loadfile([[/Users/nbr/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/libuv.lua]])().spawn_stdio({g = {_fzf_lua_server = "/var/folders/k5/jc_1pjxx7h781rvj5y3ysmth0000gp/T/nvim.nbr/PlPz1d/fzf-lua.1714919750.5470.1"}, file_icons = false, formatter = "path.filename_first", cmd = "fd --color=never --type f --hidden --follow --exclude .git", color_icons = false, git_icons = true, debug = true, _base64 = false},[==[return require("make_entry").file]==],[==[return require("make_entry").preprocess]==])' || true [Fzf-lua]: fzf cmd: fzf --expect 'ctrl-v,ctrl-t,ctrl-g,ctrl-y,esc,ctrl-c,alt-q,ctrl-q,alt-l,ctrl-s' --preview 'VIMRUNTIME='\''/opt/homebrew/Cellar/neovim/0.9.5/share/nvim/runtime'\'' '\''/opt/homebrew/Cellar/neovim/0.9.5/bin/nvim'\'' -n --headless --clean --cmd '\''lua loadfile([[/Users/nbr/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/shell_helper.lua]])().rpc_nvim_exec_lua({fzf_lua_server=[[/var/folders/k5/jc_1pjxx7h781rvj5y3ysmth0000gp/T/nvim.nbr/PlPz1d/fzf-lua.1714919750.5470.1]], fnc_id=3 , debug=true})'\'' -- {}' --bind 'ctrl-a:toggle-all,f3:toggle-preview-wrap,zero:execute-silent(mkdir '\''/var/folders/k5/jc_1pjxx7h781rvj5y3ysmth0000gp/T/nvim.nbr/PlPz1d/3'\'' && VIMRUNTIME='\''/opt/homebrew/Cellar/neovim/0.9.5/share/nvim/runtime'\'' '\''/opt/homebrew/Cellar/neovim/0.9.5/bin/nvim'\'' -n --headless --clean --cmd '\''lua loadfile([[/Users/nbr/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/shell_helper.lua]])().rpc_nvim_exec_lua({fzf_lua_server=[[/var/folders/k5/jc_1pjxx7h781rvj5y3ysmth0000gp/T/nvim.nbr/PlPz1d/fzf-lua.1714919750.5470.1]], fnc_id=4 , debug=true})'\'' -- ),ctrl-u:preview-page-up,ctrl-c:abort,ctrl-q:select-all+accept,f4:toggle-preview,ctrl-d:preview-page-down' --keep-right --preview-window 'nohidden:right:0' --no-separator --padding '0,3' --reverse --prompt ' ' --no-scrollbar --layout 'reverse' --border-label '[ Vin ]' --no-info --height '100%' --print-query --color 'query:#998ed9,formatter:path.filename_first,bg+:#e3e6e5,hl+:#998ed9,hl:#606a67,fg+:#4db290,marker:#7872c2,bg:#d6dbd9,gutter:#d6dbd9,spinner:#998ed9,info:#998ed9,border:#4db290,pointer:#998ed9,prompt:#998ed9,header:#606a67,label:#4db290,fg:#313533' --header ':: <^[[38;2;0;250;154mctrl-g^[[0m> to ^[[38;2;139;35;35mDisable .gitignore^[[0m' --multi --ansi --border 'none' > '/var/folders/k5/jc_1pjxx7h781rvj5y3ysmth0000gp/T/nvim.nbr/PlPz1d/5'