Fixed broken transparency in dark theme

master
Jef Roosens 2021-02-02 10:14:08 +01:00
parent 55babb1f8e
commit e71e7f1c48
3 changed files with 26 additions and 8 deletions

View File

@ -8,13 +8,15 @@ let g:mapleader = ' '
" I use tab as my local leader
let g:maplocalleader = "\<tab>"
" This sources all the files inside the init directory
" The directory must be in your runtimepath; my init directory
" is inside my ~/.config/nvim directory, this one is always in
" runtimepath
" Without the !, runtime only sources the first file in the list,
" instead of all
runtime! init/*.vim
" Here, I source the various config files. I explicitely source them one by one
" to ensure their order is always the same (the autocmds are needed later, e.g.
" when the colorscheme is sourced)
runtime init/autocmds.vim
runtime init/keys.vim
runtime init/netrw.vim
runtime init/settings.vim
" The configs for the various plugins don't have a particular order to them
runtime! init/plugins/*.vim
" This sources a .vim/local.vim file in the current directory, if it exists.

12
init/autocmds.vim 100644
View File

@ -0,0 +1,12 @@
function! OverwriteBackground()
" We only want a transparent background if we're using the dark theme
if g:colors_name == 'flattened_dark'
highlight Normal guibg=NONE ctermbg=NONE
highlight LineNr ctermfg=NONE ctermbg=NONE
endif
endfunction
augroup ColorschemeOverwrite
autocmd!
autocmd ColorScheme * call OverwriteBackground()
augroup END

View File

@ -6,10 +6,14 @@ call plug#begin('~/.config/nvim/plugged')
" definitions easily.
" Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' }
" File navigation
" Fast file navigation using fuzzy search
"
" https://github.com/ctrlpvim/ctrlp.vim
Plug 'ctrlpvim/ctrlp.vim'
" Git client within Vim
"
" https://github.com/tpope/vim-fugitive
Plug 'tpope/vim-fugitive'
" Change surrounding quotes, brackets...