ibhagwan / fzf-lua

Improved fzf.vim written in lua
GNU Affero General Public License v3.0
2.15k stars 141 forks source link

--color options inside fzf_opts stop working after Windows support #1052

Closed gmr458 closed 6 months ago

gmr458 commented 6 months ago

Info

fzf-lua configuration ```lua require('fzf-lua').setup({ winopts = { border = 'single', row = 0.40, col = 0.49, preview = { vertical = 'down:65%', horizontal = 'right:60%', layout = 'vertical', }, on_create = function() vim.keymap.set( 't', '', '', { silent = true, buffer = true } ) vim.keymap.set( 't', '', '', { silent = true, buffer = true } ) end, }, keymap = { builtin = { [''] = 'toggle-preview', [''] = 'preview-page-down', [''] = 'preview-page-up', }, fzf = { ['tab'] = 'toggle-down', ['shift-tab'] = 'toggle-up', ['ctrl-d'] = 'preview-page-down', ['ctrl-u'] = 'preview-page-up', }, }, actions = { files = { ['default'] = actions.file_edit, ['ctrl-x'] = actions.file_split, ['ctrl-v'] = actions.file_vsplit, }, }, fzf_opts = { ['--color'] = vim.o.background .. ',bg+:-1', ['--scrollbar'] = '█', ['--info'] = 'right', ['--no-bold'] = '', }, files = { git_icons = false, cwd_prompt = false, fzf_opts = { ['--info'] = 'right', }, }, git = { status = { preview_pager = preview_pager, }, }, grep = { git_icons = false, fzf_opts = { ['--info'] = 'right', }, }, lsp = { symbols = { fzf_opts = { ['--info'] = 'right', }, }, code_actions = { previewer = 'codeaction_native', preview_pager = preview_pager, }, }, }) ```

Description

--color option inside fzf_opts stop working after Windows support, although it works inside fzf_args, which is what I'm using right now.

ibhagwan commented 6 months ago

Is there any specific reason to use this via fzf_opts and not fzf_colors?

I’ll make sure this use case also works.

ibhagwan commented 6 months ago

@gmr458, should work as expected with https://github.com/ibhagwan/fzf-lua/commit/3e481c962f98129621bf754ba0addd8e0981a261, also takes care of the case when setting both fzf_opts["--color"] and fzf_colors together (options will be concatenated).