add global bones_compat option

This commit is contained in:
Patrick Gingras
2023-01-11 13:36:49 -05:00
parent 9d865e070a
commit 661237348a
13 changed files with 21 additions and 12 deletions

9
autoload/bones.vim Normal file
View File

@@ -0,0 +1,9 @@
function! bones#_compat(colors_name)
if exists('g:' . a:colors_name . '_compat')
return g:{a:colors_name}_compat != 0
elseif exists('g:bones_compat')
return g:bones_compat != 0
else
return 0
endif
endfunction

View File

@@ -5,7 +5,7 @@ endif
let g:colors_name = 'duckbones' let g:colors_name = 'duckbones'
set background=dark set background=dark
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'forestbones' let g:colors_name = 'forestbones'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim' && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -5,7 +5,7 @@ endif
let g:colors_name = 'kanagawabones' let g:colors_name = 'kanagawabones'
set background=dark set background=dark
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'neobones' let g:colors_name = 'neobones'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -5,7 +5,7 @@ endif
let g:colors_name = 'nordbones' let g:colors_name = 'nordbones'
set background=dark set background=dark
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'rosebones' let g:colors_name = 'rosebones'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'seoulbones' let g:colors_name = 'seoulbones'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'tokyobones' let g:colors_name = 'tokyobones'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -5,7 +5,7 @@ endif
let g:colors_name = 'vimbones' let g:colors_name = 'vimbones'
set background=light set background=light
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'zenbones' let g:colors_name = 'zenbones'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -5,7 +5,7 @@ endif
let g:colors_name = 'zenburned' let g:colors_name = 'zenburned'
set background=dark set background=dark
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif

View File

@@ -4,7 +4,7 @@ endif
let g:colors_name = 'zenwritten' let g:colors_name = 'zenwritten'
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0) if has('nvim') && !bones#_compat(g:colors_name)
lua require("zenbones.util").apply_colorscheme() lua require("zenbones.util").apply_colorscheme()
finish finish
endif endif