I wanted to have my background transparent so I added up those two lines in my .SpaceVim.d/init.vim file:
highlight Normal guibg=NONE ctermbg=NONE
highlight NonText guibg=NONE ctermbg=NONE
after adding those two lines, and sourcing the file with :source % it makes the background transparent (though only in areas with text).
BUT, the background isn't transparent when I reopen the file or open another file.
I guess the theme is loaded after my two lines are read.
you can use autocmd for this kind of command, highlight will be cleared when you switch colorscheme.
so you can use something like this
func! s:transparent_background()
highlight Normal guibg=NONE ctermbg=NONE
highlight NonText guibg=NONE ctermbg=NONE
endf
autocmd ColorScheme * call s:transparent_background()
It is an old closed post. It is worth mentioning that for spacevim 1.6.0 as of now, we need the following configurations to get a transparent background.
highlight Normal guibg=NONE ctermbg=NONE
highlight NonText guibg=NONE ctermbg=NONE
highlight EndOfBuffer guibg=NONE ctermbg=NONE
Most helpful comment
you can use autocmd for this kind of command, highlight will be cleared when you switch colorscheme.
so you can use something like this