Make vim support theme updates

This commit is contained in:
Max Bucknell 2020-03-07 10:47:34 +11:00
parent 812e92b08a
commit 952e4518c9
2 changed files with 12 additions and 11 deletions

View file

@ -1,3 +1,14 @@
function! darkmodesocket#updateTheme()
let is_dark_mode = system("isdark")
if is_dark_mode == "true\n"
set background=dark
colorscheme maxbucknell_dark
else
set background=light
colorscheme maxbucknell_neo
endif
endfunction
function! darkmodesocket#listenForLights()
let pid = string(getpid())

View file

@ -152,17 +152,7 @@ syntax on
" Enable file type detection.
filetype plugin indent on
" Theme configuration
" Should make this a plugin that detects file changes somehow
let g:is_dark_mode = system("isdark")
if g:is_dark_mode == "true\n"
set background=dark
colorscheme maxbucknell_dark
else
set background=light
colorscheme maxbucknell_neo
endif
call darkmodesocket#updateTheme()
let g:go_def_mapping_enabled = 0