Comments (7)
Do you have bat installed on your system? Because the previewer will use it if it's available and you can customize the colors of it by setting BAT_THEME
.
An example config:
colo gruvbox
set background=light
let $BAT_THEME = 'gruvbox-light'
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
And this is what it looks like:
from fzf.vim.
@junegunn I don't have.
$ bat
bash: bat: command not found
minimal vimrc with only fzf and gruvbox and the same configurations as you:
let mapleader = " "
nnoremap <leader>e :E<CR>
nnoremap <leader>f :Files<CR>
nnoremap <leader>g :RG<CR>
nnoremap <leader>s :G<CR>
nnoremap <leader><space> :Buffers<CR>
set clipboard=unnamedplus
call plug#begin('~/.vim.plugged')
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'morhetz/gruvbox'
call plug#end()
colo gruvbox
set background=light
let $BAT_THEME = 'gruvbox-light'
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
Result:
In this case do you believe there is something wrong in my side/my terminal anything like that?
from fzf.vim.
I installed BAT to test the configs, this is the result:
$ bat --version
bat 0.23.0 (871abd2)
from fzf.vim.
Tried to use different terminals, like alacritty and kitty same result.. I saw this https://sw.kovidgoyal.net/kitty/faq/#using-a-color-theme-with-a-background-color-does-not-work-well-in-vim and gave it a try, then the colors changed a bit they are more readable but still not ok.
from fzf.vim.
Using a different vim version also changed the colors.. (now with my original vimrc)
$ /usr/bin/vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 04 2023 10:24:44)
Included patches: 1-1378, 1499
Modified by [email protected]
Compiled by [email protected]
from fzf.vim.
The last screenshot clearly shows that the configs are picked up. Can you double-check if they are properly set?
:echo $BAT_THEME
:echo g:fzf_colors
- Also, what is the output of
:echo fzf#wrap()
(you should see some color codes ifg:fzf_colors
is set) - Is
&termguicolors
set?:echo &termguicolors
from fzf.vim.
$ vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 4 2023 09:48:24)
Included patches: 1-1976
Thank you for the help in the end updating the vim for the latest version, plus installing bat and setting it to let $BAT_THEME = 'gruvbox-light'
worked!
Tested with and without g:fzf_colors and in both cases it is working fine now.
from fzf.vim.
Related Issues (20)
- Question: can I change my fzf query with a shortcut
- Feature Request: let preview command highlight line HOT 3
- Getting `;5u` when pressing C-/ to toggle preview
- FZF Popup breaks when you scroll on windows
- How to use Rg to search recent file contents HOT 5
- Feature Request: add a fzf#vim#buffer_grep
- Unable to use commands like :Files and :Buffers HOT 3
- Splits with WinBar change size when opening and closing FZF
- [Feature Request] functional, blocking version of `fzf#run` for neovim HOT 4
- custom fzf_action behaviour have been broken by recent commit HOT 2
- :Helptags perl command failing HOT 11
- "Tab drop" no longer works as fzf action for jumping to existing tab HOT 2
- Errors when running 'History:' and 'History/' commands HOT 1
- preview.sh not previewing files with nested path on Windows HOT 5
- Ctrl+T/Ctrl+X/Ctrl+V actions don't work correctly in some cases when a swap file exists HOT 4
- How to get fzf.vim to index files at startup? HOT 1
- cursor shape changed from underscore to block in iTerm2 HOT 4
- how to grep through a passed filelist
- Regression/error when running :Tags HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf.vim.