Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing color specifications #3519

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vantaboard
Copy link

Some color specifications were missing which introduced terminal scheme weirdness when exporting with

:call append('$', printf('export FZF_DEFAULT_OPTS="%s"', matchstr(fzf#wrap().options, "--color[^']*")))

Before and after with junegunn/seoul256.vim (dark):

image image

Before and after with junegunn/seoul256.vim (light):

image image

The following changes resolve this:

commit e4eb64f82a88888729c0624bf5790cd29bea86b2
Author: Brighten Tompkins <[email protected]>
Date:   Wed Nov 29 08:47:14 2023 -0800

    [advanced-docs] add missing color specs

diff --git a/ADVANCED.md b/ADVANCED.md
index 661bac1..00311fb 100644
--- a/ADVANCED.md
+++ b/ADVANCED.md
@@ -583,6 +583,7 @@ Here is an example. Add this to your Vim configuration file.
 let g:fzf_colors =
 \ { 'fg':         ['fg', 'Normal'],
   \ 'bg':         ['bg', 'Normal'],
+  \ 'preview-fg': ['bg', 'Normal'],
   \ 'preview-bg': ['bg', 'NormalFloat'],
   \ 'hl':         ['fg', 'Comment'],
   \ 'fg+':        ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
@@ -594,6 +595,9 @@ let g:fzf_colors =
   \ 'pointer':    ['fg', 'Exception'],
   \ 'marker':     ['fg', 'Keyword'],
   \ 'spinner':    ['fg', 'Label'],
+  \ 'gutter':     ['bg', 'SignColumn'],
+  \ 'query':      ['fg', 'Comment'],
+  \ 'disabled':   ['fg', 'Ignore'],
   \ 'header':     ['fg', 'Comment'] }

Additionally, I added an example for Lua configurations and updated the FZF_DEFAULT_OPTS variable for junegunn/seoul256.vim, morhetz/gruvbox, arcticicestudio/nord-vim, and tomasr/molokai.

@vantaboard vantaboard changed the title Missing color specifications Add missing color specifications Nov 29, 2023
```

![seoul256-light](https://user-images.githubusercontent.com/700826/113475022-389d8600-94ae-11eb-905f-0939dd535837.png)

```sh
# morhetz/gruvbox
export FZF_DEFAULT_OPTS='--color=bg+:#3c3836,bg:#32302f,spinner:#fb4934,hl:#928374,fg:#ebdbb2,header:#928374,info:#8ec07c,pointer:#fb4934,marker:#fb4934,fg+:#ebdbb2,prompt:#fb4934,hl+:#fb4934'
export FZF_DEFAULT_OPTS='--color=fg+:#3c3836,preview-bg:#d5c4a1,info:#427b58,spinner:#9d0006,prompt:#9d0006,fg:#3c3836,header:#928374,marker:#9d0006,hl+:#9d0006,query:#928374,hl:#928374,pointer:#9d0006'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The colors doesn't look right.

Before:

image

After:

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which theme were you trying?

```vim
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'preview-fg': ['bg', 'Normal'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preview-fg defaults to fg, so this line shouldn't be necessary. And the first argument bg doesn't seem correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants