File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ function! s:statusline(winnr, char) abort
8282 let width = winwidth (a: winnr ) - len (a: winnr . ' ' ) - 6
8383 let leading = repeat (' ' , width / 2 )
8484 return printf (
85- \ ' %%#NonText #%s%%#DiffText # %s %%#NonText #' ,
85+ \ ' %%#FernWindowSelectStatusLine #%s%%#FernWindowSelectIndicator # %s %%#FernWindowSelectStatusLine #' ,
8686 \ leading,
8787 \ a: char ,
8888 \)
@@ -105,7 +105,19 @@ function! s:cunmap_all() abort
105105 endfor
106106endfunction
107107
108+ function ! s: highlight () abort
109+ highlight default link FernWindowSelectStatusLine StatusLineNC
110+ highlight default link FernWindowSelectIndicator DiffText
111+ endfunction
112+
108113call s: Config .config (expand (' <sfile>:p' ), {
109114 \ ' auto_select' : 1 ,
110115 \ ' select_chars' : split (' abcdefghijklmnopqrstuvwxyz' , ' \zs' ),
111116 \} )
117+
118+ augroup fern_internal_window_internal
119+ autocmd !
120+ autocmd ColorScheme * call s: highlight ()
121+ augroup END
122+
123+ call s: highlight ()
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ Window selector~
6565 Fern has an internal window selector which works like
6666 t9md/vim-choosewin. Users can quickly select which window to open a
6767 selected node.
68+ See | hl-FernWindowSelectIndicator | and | hl-FernWindowSelectStatusLine |
69+ to customize the statusline when selecting a window.
6870 https://github.com/t9md/vim-choosewin
6971
7072Renamer (A.k.a exrename)~
@@ -615,11 +617,19 @@ FernBranchSymbol *hl-FernBranchSymbol*
615617 An actual appearance will be determined by the | fern-renderer | thus
616618 this highlight might not be referred.
617619
618- FernBranchText *hl-FernBranchText*
620+ FernBranchText *hl-FernBranchText*
619621 A | highlight | group of renderer used for branch node text.
620622 An actual appearance will be determined by the | fern-renderer | thus
621623 this highlight might not be referred.
622624
625+ FernWindowSelectIndicator *hl-FernWindowSelectIndicator*
626+ A | highlight | group used for an indicator when selecting a window
627+ through "open:select" action.
628+
629+ FernWindowSelectStatusLine *hl-FernWindowSelectStatusLine*
630+ A | highlight | group used for | statusline | when selecting a window
631+ through "open:select" action.
632+
623633
624634=============================================================================
625635CHANGELOG *fern-changelog*
You can’t perform that action at this time.
0 commit comments