mirror of https://gitlab.com/baco/dotconf.git
Use onedark.vim's interface to unset background
Instead of using bare Vim command to set background for onedark.vim use the functions defined by the theme. This approach works properly on both, Vim and Neovim.
This commit is contained in:
parent
28a0048042
commit
bc0f1da598
|
@ -42,11 +42,17 @@ if exists('g:colors_name') && g:colors_name == 'aldmeris'
|
|||
endif
|
||||
|
||||
packadd onedark.vim
|
||||
" onedark.vim override: Don't set a background color when running in a
|
||||
" terminal; just use the terminal's background color
|
||||
if (has('autocmd') && !has('gui_running')
|
||||
augroup colorset
|
||||
autocmd!
|
||||
autocmd ColorScheme * silent!
|
||||
\ call onedark#extend_highlight('Normal', {'bg': {'gui': 'NONE'}})
|
||||
augroup END
|
||||
endif
|
||||
silent! colorscheme onedark
|
||||
if exists('g:colors_name') && g:colors_name == 'onedark'
|
||||
if !has('gui_running')
|
||||
highlight Normal guibg=NONE
|
||||
endif
|
||||
if has('termguicolors')
|
||||
set termguicolors
|
||||
endif
|
||||
|
|
12
vim/vimrc
12
vim/vimrc
|
@ -41,11 +41,17 @@ if exists('g:colors_name') && g:colors_name == 'aldmeris'
|
|||
endif
|
||||
|
||||
packadd onedark.vim
|
||||
" onedark.vim override: Don't set a background color when running in a
|
||||
" terminal; just use the terminal's background color
|
||||
if (has('autocmd') && !has('gui_running'))
|
||||
augroup colorset
|
||||
autocmd!
|
||||
autocmd ColorScheme * silent!
|
||||
\ call onedark#extend_highlight('Normal', {'bg': {'gui': 'NONE'}})
|
||||
augroup END
|
||||
endif
|
||||
silent! colorscheme onedark
|
||||
if exists('g:colors_name') && g:colors_name == 'onedark'
|
||||
if !has('gui_running')
|
||||
highlight Normal guibg=NONE
|
||||
endif
|
||||
if has('termguicolors')
|
||||
set termguicolors
|
||||
if !empty($TMUX) && (&term =~ 'tmux' || &term =~ 'screen')
|
||||
|
|
Loading…
Reference in New Issue