Make vim support theme updates
This commit is contained in:
parent
812e92b08a
commit
952e4518c9
2 changed files with 12 additions and 11 deletions
|
@ -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()
|
function! darkmodesocket#listenForLights()
|
||||||
let pid = string(getpid())
|
let pid = string(getpid())
|
||||||
|
|
|
@ -152,17 +152,7 @@ syntax on
|
||||||
" Enable file type detection.
|
" Enable file type detection.
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" Theme configuration
|
call darkmodesocket#updateTheme()
|
||||||
" 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
|
|
||||||
|
|
||||||
let g:go_def_mapping_enabled = 0
|
let g:go_def_mapping_enabled = 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue