vim: use more robust highlighting stuff

master
an 2019-08-12 18:54:59 -04:00
parent 31e639104d
commit f5f03d9e6a
1 changed files with 15 additions and 9 deletions

View File

@ -103,8 +103,6 @@ fu _agw.file_type()
endfu endfu
fu _agw.statusline_start() fu _agw.statusline_start()
hi clear StatusLine
hi StatusLine guibg=#0a0a0a guifg=#92ebf0
return '' return ''
endfu endfu
@ -134,6 +132,17 @@ fu _agw.setup_asm()
setlocal filetype=asm_ca65 setlocal filetype=asm_ca65
endfu endfu
fu _agw.set_color(scheme)
execute 'colorscheme' g:_agw.colors[a:scheme]
hi clear StatusLine
hi clear SpecialKey
hi clear NonText
hi StatusLine guibg=#0a0a0a guifg=#92ebf0
hi SpecialKey guifg=#7e4594
hi NonText guifg=#7e4594
hi Normal ctermbg=bg guibg=NONE
endfu
" Settings -------------------------------------------------------------------| " Settings -------------------------------------------------------------------|
" general settings (use :help for these) " general settings (use :help for these)
@ -356,10 +365,6 @@ else
set directory=$HOME/.vim/temp// set directory=$HOME/.vim/temp//
endif endif
let ruby_heredoc_syntax_filetypes = {
\ "ninja": {"start": "__ninja__"},
\}
if _agw.use_rainbow != 0 if _agw.use_rainbow != 0
let rainbow_conf = { let rainbow_conf = {
\ 'guifgs': ['#ff533d', '#ff973d', '#ffe13d', '#91ff3d', '#3dffd8', '#3daeff', '#6a3dff', '#ee3dff'], \ 'guifgs': ['#ff533d', '#ff973d', '#ffe13d', '#91ff3d', '#3dffd8', '#3daeff', '#6a3dff', '#ee3dff'],
@ -407,10 +412,12 @@ end
syntax on syntax on
set background=dark
if _agw.cr_scheme == -2 if _agw.cr_scheme == -2
colorscheme evening colorscheme evening
elseif _agw.cr_scheme != -1 elseif _agw.cr_scheme != -1
execute 'colorscheme' _agw.colors[_agw.cr_scheme] call _agw.set_color(_agw.cr_scheme)
endif endif
filetype on filetype on
@ -449,8 +456,7 @@ au BufEnter * call _agw.close_empty()
" set color randomly on buffer enter " set color randomly on buffer enter
if _agw.cr_scheme == -1 if _agw.cr_scheme == -1
au BufEnter * execute 'colorscheme' au BufEnter * call _agw.set_color(localtime() % len(_agw.colors))
\ _agw.colors[localtime() % len(_agw.colors)]
endif endif
" .rkt → Racket " .rkt → Racket