Comments (7)
$ 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.
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.
Related Issues (20)
- override fzf_history_dir option CTRL-P and CTRL-N mappings HOT 1
- [Feature] universal fzf: use one command to `fzf` sources of many different categories HOT 1
- `:Tags` is very slow on large tags file HOT 1
- Provide ability to add own log command HOT 2
- Add the option for Rg command to search the word under the cursor HOT 4
- Let FZF_PREVIEW_COMMAND take over for binary files too HOT 1
- Search text in files of certain type HOT 1
- vim.ui.select wrapper for fzf.vim HOT 1
- fzf Doesn't load all Helptags before showing entries when runnign `nvim +Helptags` from bash HOT 4
- :Rg [pattern] [file or folder location] not behaving as expected HOT 1
- Marks has no preview
- Perform different sink actions on Enter and Shift+Enter HOT 1
- `preview.sh` is inaccessible under Windows by default. HOT 3
- [Rg] Is there a way to open the file and navigate to a line without having paths and line numbers in the output? HOT 1
- GitBranchFiles ?
- :Tags<cr>Query behaves differently from :Tags Query<cr> HOT 6
- The preview window pops up and then crashes before you can see it clearly on Windows 10 HOT 8
- [bug] :Commands command do not fuzzy find in windows HOT 2
- [bug] g:fzf_vim.preview_bash forced to always use backlash in windows
- Show enclosing object for line in preview window
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.