Closed Masber closed 1 month ago
The performance gains by --ansi
are because fzf will not try to detect ansi escape codes and display colors, but this isn't a bug, if you're using --ansi
also make sure the ripgrep results never use colors by using a custom grep.cmd
or grep.rg_opts
(see the default command in the README and add --color=never
).
You can add debug=true
to see the underlying command to see if you did it right (see the first DEBUG line):
https://github.com/ibhagwan/fzf-lua/commit/1e03541de4d8a169defe83bb4d7abfba450c63a1
@Masber, I added --ansi
to grep in the max-perf
profile, you can now use:
require("fzf-lua").setup({ "max-perf" })
-- Or if you prefer window titles instead of prompt titles
require("fzf-lua").setup({ { "default-title", "max-perf" } })
why not fzf_opts = { ['--ansi'] = false },
under root?
why not
fzf_opts = { ['--ansi'] = false },
under root?
I haven’t tested all the pickers with it, some other pickers like lsp still have colors, I’d welcome a PR for it if you test the pickers and set the appropriate hls.xxx
to false.
I'm not entirely sure if it's related, but when i use path.filename_first
as a formatter for grep i get this still:
I'm not entirely sure if it's related, but when i use
path.filename_first
as a formatter for grep i get this still:
Yes, 100% related that’s the ansi escape sequence for the highlight FzfLuaDirPart
, unlink it or set hls.dir_part = false
to remove the escape sequence.
RTFM Checklist
man fzf
/ I am well versed in shell fzfOperating system
Linus Ubuntu 24.04.1
Shell
bash
Neovim version (
nvim --version
)NVIM v0.10.1
Fzf version (
fzf --version
)0.55.0 (fc69308)
Output of
:lua print(os.getenv('FZF_DEFAULT_OPTS'))
nil
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
I have disabled ansi in fzf because I don't mind about colors and I prioritize responsiveness. However I realized, the escape chars for colors are not escaped making difficult to understand the fzf results (see screenshot below)