sainnhe / everforest

🌲 Comfortable & Pleasant Color Scheme for Vim
MIT License
2.89k stars 132 forks source link

Change the color of matching bracket in gVIm #146

Closed TayTTo closed 1 month ago

TayTTo commented 1 month ago

I have done the following steps before reporting this issue:

Operating system/version

Windows 11 pro 23H2

GUI client/version

vim 9.1

Feature matrix

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Sep 22 2024 22:13:33)
MS-Windows 64-bit GUI/console version with OLE support
Included patches: 1-740
Compiled by appveyor@APPVEYOR-VM
Huge version with GUI.  Features included (+) or not (-):
+acl                +ex_extra           +mzscheme/dyn       -tcl
+arabic             +extra_search       +netbeans_intg      +termguicolors
+autocmd            -farsi              +num64              +terminal
+autochdir          +file_in_path       +ole                -termresponse
+autoservername     +find_in_path       +packages           +textobjects
+balloon_eval       +float              +path_extra         +textprop
+balloon_eval_term  +folding            +perl/dyn           -tgetent
+browse             -footer             +persistent_undo    +timers
++builtin_terms     +gettext/dyn        +popupwin           +title
+byte_offset        -hangul_input       -postscript         +toolbar
+channel            +iconv/dyn          +printer            +user_commands
+cindent            +insert_expand      +profile            +vartabs
+clientserver       +ipv6               +python/dyn         +vertsplit
+clipboard          +job                +python3/dyn-stable +vim9script
+cmdline_compl      +jumplist           +quickfix           +viminfo
+cmdline_hist       +keymap             +reltime            +virtualedit
+cmdline_info       +lambda             +rightleft          +visual
+comments           +langmap            +ruby/dyn           +visualextra
+conceal            +libcall            +scrollbind         +vreplace
+cryptv             +linebreak          +signs              +vtp
+cscope             +lispindent         +smartindent        +wildignore
+cursorbind         +listcmds           +sodium/dyn         +wildmenu
+cursorshape        +localmap           +sound              +windows
+dialog_con_gui     +lua/dyn            +spell              +writebackup
+diff               +menu               +startuptime        -xattr
+digraphs           +mksession          +statusline         -xfontset
+directx            +modify_fname       -sun_workshop       -xim
-dnd                +mouse              +syntax             +xpm_w32
-ebcdic             +mouseshape         +tag_binary         -xterm_save
+emacs_tags         +multi_byte_ime/dyn -tag_old_static
+eval               +multi_lang         -tag_any_white
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DHAVE_STDINT_H  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32 -DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"libsodium.dll\" /I "C:\projects\vim-win32-installer\dependencies\libsodium\include" -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 /source-charset:utf-8 /MP /Ox /GL -DNDEBUG /Zl /MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DVIMDLL -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python3.dll\" -DDYNAMIC_PYTHON3_STABLE_ABI -DFEAT_MZSCHEME -I "C:\projects\vim-win32-installer\dependencies\racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_dcgt6o.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_dcgt6o.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl532.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-ucrt-ruby320.dll\" -DRUBY_VERSION=32 -DFEAT_HUGE /Fd.\ObjDXOULYHRZAMD64/ /Zi
Linking: link /nologo /opt:ref /LTCG /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib user32.lib  /machine:AMD64 version.lib  winspool.lib comctl32.lib libcmt.lib oleaut32.lib  /nodefaultlib:lua54.lib  /STACK:8388608  /nodefaultlib:python27.lib  /nodefaultlib:python3.lib   winmm.lib  Ws2_32.lib xpm\x64\lib-vc14\libXpm.lib  /PDB:vim64.pdb -debug

Minimal vimrc that can reproduce this bug.

call plug#begin()
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'mattn/vim-lsp-settings'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'

Plug 'sheerun/vim-polyglot'
Plug 'sainnhe/everforest'

Plug 'mattn/emmet-vim'
call plug#end()

" For light version.
set background=light

" Set contrast.
" Available values: 'hard', 'medium'(default), 'soft'
let g:everforest_background = 'medium'

" For better performance
let g:everforest_better_performance = 1

colorscheme everforest
hi! MatchParen guibg=#ff0000 guifg=#ffffff gui=bold

let g:everforest_cursor = 'blue'
let g:everforest_colors_override = {'bg_visual': ['#CCE5FF', '255'], }

Steps to reproduce this bug using minimal vimrc

I want the color of highlighting matching brackets more obviously such as red, the current color is not very obviously. image

Expected behavior

I want to change the color of matching bracket, how can I do that, I spent quite time for reading the doc but cannot findout how to do it.

Actual behavior

When I add the line hi! MatchParen guibg=#ff0000 guifg=#ffffff gui=bold I want the color of match bracket is red not grey.

antoineco commented 1 month ago

The documentation explains how to perform local customizations to the colorscheme. Here is an example, replace your call to hi with the following snippet:

augroup EverforestCustom
  autocmd!
  autocmd ColorScheme everforest
  \       hi! MatchParen guibg=#ff0000 guifg=#ffffff gui=bold
augroup END

Result:

image