From 76eacb2ac270d09577ec15e36f3b75d9335881b9 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sat, 22 May 2021 17:10:37 +0300 Subject: [PATCH] [nvim+zsh] use a better FZF theme --- nvim/colors/dotfiles.vim | 5 +++-- nvim/plugin/interface.vim | 2 ++ zsh/env.zsh | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nvim/colors/dotfiles.vim b/nvim/colors/dotfiles.vim index ec9826f..bea107b 100644 --- a/nvim/colors/dotfiles.vim +++ b/nvim/colors/dotfiles.vim @@ -5,7 +5,8 @@ execute 'source' fnameescape(g:dotfiles_dir.'/colorschemes/out/vim.vim') - if !&termguicolors && exists('$_COLORSCHEME_TERMINAL') + let s:is_gui_color = !has('win32') && !has('win64') && !has('win32unix') && has('termguicolors') && &termguicolors + if s:is_gui_color && exists('$_COLORSCHEME_TERMINAL') set notermguicolors endif @@ -153,7 +154,7 @@ call s:hi('SpellLocal', s:spell_fg, s:is_kitty ? '' : 0xC, s:spell_attr, 0xC) call s:hi('SpellCap', s:spell_fg, s:is_kitty ? '' : 0xD, s:spell_attr, 0xD) call s:hi('SpellRare', s:spell_fg, s:is_kitty ? '' : 0xE, s:spell_attr, 0xE) - unlet s:is_kitty s:spell_fg s:spell_attr + unlet s:spell_fg s:spell_attr call s:hi('Sneak', 'bg', 0xB, 'bold', '') hi! link SneakScope Visual diff --git a/nvim/plugin/interface.vim b/nvim/plugin/interface.vim index 11671da..8e357ce 100644 --- a/nvim/plugin/interface.vim +++ b/nvim/plugin/interface.vim @@ -123,6 +123,8 @@ endif nnoremap Helptags nnoremap f Files nnoremap b Buffers + " + let $FZF_DEFAULT_OPTS = '--color=16' let g:fzf_layout = { 'down': '~40%' } let g:fzf_preview_window = ['right:noborder', 'ctrl-/'] " }}} diff --git a/zsh/env.zsh b/zsh/env.zsh index eca6fb0..baf1882 100644 --- a/zsh/env.zsh +++ b/zsh/env.zsh @@ -31,3 +31,6 @@ export JQ_COLORS="${(j.:.)jq_colors}" unset jq_colors export HOMEBREW_NO_AUTO_UPDATE=1 + +# https://github.com/junegunn/fzf/blob/764316a53d0eb60b315f0bbcd513de58ed57a876/src/tui/tui.go#L496-L515 +export FZF_DEFAULT_OPTS="--color=16"