aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-09-20 19:09:56 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-09-20 19:09:56 +0300
commit5ec55f35744239e6a25ed651c5b87335a04653b6 (patch)
treeba46d6605da25c89dd4861953cc54e6af5a9e386
parentfe74d80789ea81faed229439d2ee5db13307dda9 (diff)
downloadvimrice-5ec55f35744239e6a25ed651c5b87335a04653b6.tar.gz
vimrice-5ec55f35744239e6a25ed651c5b87335a04653b6.zip
Edit colorscheme to allow for non-"opaque" bg
With this option, now it is possible to not set the text background and use instead the terminal's one background, for example, if one wants to use a terminal with transparency.
-rw-r--r--dotfiles/.config/nvim/init.vim5
-rw-r--r--dotfiles/.local/share/nvim/site/colors/ultramar.vim19
2 files changed, 18 insertions, 6 deletions
diff --git a/dotfiles/.config/nvim/init.vim b/dotfiles/.config/nvim/init.vim
index af02383..f2525d3 100644
--- a/dotfiles/.config/nvim/init.vim
+++ b/dotfiles/.config/nvim/init.vim
@@ -8,6 +8,8 @@ if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
+" TODO: bind to insert datetime
+
call plug#begin('~/.local/share/nvim/site/plugged')
Plug 'junegunn/goyo.vim'
Plug 'PotatoesMaster/i3-vim-syntax'
@@ -47,8 +49,9 @@ call plug#end()
set number
" Colors
- colorscheme ultramar
let g:ultramar_italic=1
+ let g:ultramar_opaque_bg=0
+ colorscheme ultramar
if $COLORSCHEME == "light"
set background=light
endif
diff --git a/dotfiles/.local/share/nvim/site/colors/ultramar.vim b/dotfiles/.local/share/nvim/site/colors/ultramar.vim
index c092c20..ae89c28 100644
--- a/dotfiles/.local/share/nvim/site/colors/ultramar.vim
+++ b/dotfiles/.local/share/nvim/site/colors/ultramar.vim
@@ -29,6 +29,7 @@ endif
if !exists('g:ultramar_bold')
let g:ultramar_bold=1
endif
+
if !exists('g:ultramar_italic')
if has('gui_running') || $TERM_ITALICS == 'true'
let g:ultramar_italic=1
@@ -36,12 +37,15 @@ if !exists('g:ultramar_italic')
let g:ultramar_italic=0
endif
endif
+
if !exists('g:ultramar_undercurl')
let g:ultramar_undercurl=1
endif
+
if !exists('g:ultramar_underline')
let g:ultramar_underline=1
endif
+
if !exists('g:ultramar_inverse')
let g:ultramar_inverse=1
endif
@@ -65,6 +69,9 @@ endif
if !exists('g:ultramar_invert_indent_guides')
let g:ultramar_invert_indent_guides=0
endif
+if !exists('g:ultramar_opaque_bg')
+ let g:ultramar_opaque_bg=1
+endif
let s:is_dark=(&background == 'dark')
@@ -137,8 +144,6 @@ endif
" }}}
" Setup Colors: {{{
-let s:vim_bg = ['bg', 'bg']
-let s:vim_fg = ['fg', 'fg']
let s:none = ['NONE', 'NONE']
" determine relative colors
@@ -424,7 +429,11 @@ call s:HL('UltramarAquaSign', s:aqua, s:sign_column, s:invert_signs)
" General UI: {{{
" Normal text
-call s:HL('Normal', s:fg1, s:bg0)
+if g:ultramar_opaque_bg == 1
+ call s:HL('Normal', s:fg1, s:bg0)
+else
+ call s:HL('Normal', s:fg1)
+endif
" Correct background (see issue #7):
" --- Problem with changing between dark and light on 256 color terminal
@@ -541,8 +550,8 @@ else
endif
call s:HL('Comment', s:gray, s:none, s:italicize_comments)
-call s:HL('Todo', s:vim_fg, s:vim_bg, s:bold . s:italic)
-call s:HL('Error', s:red, s:vim_bg, s:bold . s:inverse)
+call s:HL('Todo', s:fg0, s:bg0, s:bold . s:italic)
+call s:HL('Error', s:red, s:bg0, s:bold . s:inverse)
" Generic statement
hi! link Statement UltramarRed