mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-16 23:33:42 -05:00
Toggle lightline as well
This commit is contained in:
@@ -32,7 +32,8 @@ Configuration
|
||||
|
||||
By default, [vim-airline](https://github.com/bling/vim-airline),
|
||||
[vim-powerline](https://github.com/Lokaltog/vim-powerline),
|
||||
[powerline](https://github.com/Lokaltog/powerline), and
|
||||
[powerline](https://github.com/Lokaltog/powerline),
|
||||
[lightline.vim](https://github.com/itchyny/lightline.vim), and
|
||||
[vim-gitgutter](https://github.com/airblade/vim-gitgutter) are temporarily
|
||||
disabled while in Goyo mode.
|
||||
|
||||
|
||||
@@ -158,6 +158,12 @@ function! s:goyo_on(width)
|
||||
augroup! PowerlineMain
|
||||
endif
|
||||
|
||||
" lightline.vim
|
||||
let t:goyo_disabled_lightline = exists('#LightLine')
|
||||
if t:goyo_disabled_lightline
|
||||
silent! call lightline#disable()
|
||||
endif
|
||||
|
||||
if !get(g:, 'goyo_linenr', 0)
|
||||
setlocal nonu
|
||||
if exists('&rnu')
|
||||
@@ -235,6 +241,7 @@ function! s:goyo_off()
|
||||
let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter
|
||||
let goyo_disabled_airline = t:goyo_disabled_airline
|
||||
let goyo_disabled_powerline = t:goyo_disabled_powerline
|
||||
let goyo_disabled_lightline = t:goyo_disabled_lightline
|
||||
|
||||
if tabpagenr() == 1
|
||||
tabnew
|
||||
@@ -268,6 +275,10 @@ function! s:goyo_off()
|
||||
silent! PowerlineReloadColorscheme
|
||||
endif
|
||||
|
||||
if goyo_disabled_lightline
|
||||
silent! call lightline#enable()
|
||||
endif
|
||||
|
||||
if exists('#Powerline')
|
||||
doautocmd Powerline ColorScheme
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user