From 8b2dc277d48c4713f320c908adefc72ee039db40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 25 Feb 2021 16:11:33 +0100 Subject: [PATCH] Use darcula theme --- symlinks/config/nvim/plugin/statusline.vim | 30 ++++----- symlinks/vim/plugin/statusline.vim | 71 +++++++++++++--------- symlinks/vim/plugins.vim | 2 +- symlinks/vim/vimrc | 3 +- 4 files changed, 60 insertions(+), 46 deletions(-) diff --git a/symlinks/config/nvim/plugin/statusline.vim b/symlinks/config/nvim/plugin/statusline.vim index bce66bf..1cc7d8c 100644 --- a/symlinks/config/nvim/plugin/statusline.vim +++ b/symlinks/config/nvim/plugin/statusline.vim @@ -5,45 +5,45 @@ function s:UpdateColors() let ctermbg = synIDattr(synIDtrans(hlID('StatusLine')), 'bg', 'cterm') let guibg = synIDattr(synIDtrans(hlID('StatusLine')), 'bg', 'gui') - let idguifg1 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'gui') - let idctermfg1 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'cterm') - " Green in gruvbox + let idguifg1 = synIDattr(synIDtrans(hlID('String')), 'fg', 'gui') + let idctermfg1 = synIDattr(synIDtrans(hlID('String')), 'fg', 'cterm') + " Green in darcula exec 'hi User1 guifg=' . l:idguifg1 . \' guibg=' . l:guibg . \' cterm=bold gui=bold' if l:idctermfg1 exec 'hi User1 ctermfg=' . l:idctermfg1 endif - let idguifg2 = synIDattr(synIDtrans(hlID('WarningMsg')), 'fg', 'gui') - let idctermfg2 = synIDattr(synIDtrans(hlID('WarningMsg')), 'fg', 'cterm') - " Red in gruvbox + let idguifg2 = synIDattr(synIDtrans(hlID('ErrorMsg')), 'fg', 'gui') + let idctermfg2 = synIDattr(synIDtrans(hlID('ErrorMsg')), 'fg', 'cterm') + " Red in darcula exec 'hi User2 guifg=' . l:idguifg2 . \' guibg=' . l:guibg . \' cterm=bold gui=bold' if l:idctermfg2 exec 'hi User2 ctermfg=' . l:idctermfg2 endif - let idguifg3 = synIDattr(synIDtrans(hlID('MoreMsg')), 'fg', 'gui') - let idctermfg3 = synIDattr(synIDtrans(hlID('MoreMsg')), 'fg', 'cterm') - " Yellow in gruvbox + let idguifg3 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'gui') + let idctermfg3 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'cterm') + " Yellow in darcula exec 'hi User3 guifg=' . l:idguifg3 . \' guibg=' . l:guibg . \' cterm=bold gui=bold' if l:idctermfg3 exec 'hi User3 ctermfg=' . l:idctermfg3 endif - let idguifg4 = synIDattr(synIDtrans(hlID('Identifier')), 'fg', 'gui') - let idctermfg4 = synIDattr(synIDtrans(hlID('Identifier')), 'fg', 'cterm') - " Blue in gruvbox + let idguifg4 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'gui') + let idctermfg4 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'cterm') + " Blue in darcula exec 'hi User4 guifg=' . l:idguifg4 \' guibg=' . l:guibg . \' cterm=bold gui=bold' if l:idctermfg4 exec 'hi User4 ctermfg=' . l:idctermfg4 endif - let idguifg5 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'gui') - let idctermfg5 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'cterm') - " Blue in gruvbox + let idguifg5 = synIDattr(synIDtrans(hlID('Constant')), 'fg', 'gui') + let idctermfg5 = synIDattr(synIDtrans(hlID('Constant')), 'fg', 'cterm') + " Purple in darcula exec 'hi User5 guifg=' . l:idguifg5 . \' guibg=' . l:guibg . \' cterm=bold gui=bold' diff --git a/symlinks/vim/plugin/statusline.vim b/symlinks/vim/plugin/statusline.vim index 699d0b0..1cc7d8c 100644 --- a/symlinks/vim/plugin/statusline.vim +++ b/symlinks/vim/plugin/statusline.vim @@ -3,48 +3,61 @@ " ----------------------------------------------------------------------------- function s:UpdateColors() - let ctermbg = synIDattr(synIDtrans(hlID('StatusLine')), 'fg', 'cterm') - let guibg = synIDattr(synIDtrans(hlID('StatusLine')), 'fg', 'gui') - let idguifg1 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'gui') - let idctermfg1 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'cterm') - " Green in gruvbox + let ctermbg = synIDattr(synIDtrans(hlID('StatusLine')), 'bg', 'cterm') + let guibg = synIDattr(synIDtrans(hlID('StatusLine')), 'bg', 'gui') + let idguifg1 = synIDattr(synIDtrans(hlID('String')), 'fg', 'gui') + let idctermfg1 = synIDattr(synIDtrans(hlID('String')), 'fg', 'cterm') + " Green in darcula exec 'hi User1 guifg=' . l:idguifg1 . - \' ctermfg=' . l:idctermfg1 . \' guibg=' . l:guibg . - \' ctermbg=' . l:ctermbg . \' cterm=bold gui=bold' - let idguifg2 = synIDattr(synIDtrans(hlID('WarningMsg')), 'fg', 'gui') - let idctermfg2 = synIDattr(synIDtrans(hlID('WarningMsg')), 'fg', 'cterm') - " Red in gruvbox + if l:idctermfg1 + exec 'hi User1 ctermfg=' . l:idctermfg1 + endif + let idguifg2 = synIDattr(synIDtrans(hlID('ErrorMsg')), 'fg', 'gui') + let idctermfg2 = synIDattr(synIDtrans(hlID('ErrorMsg')), 'fg', 'cterm') + " Red in darcula exec 'hi User2 guifg=' . l:idguifg2 . - \' ctermfg=' . l:idctermfg2 . \' guibg=' . l:guibg . - \' ctermbg=' . l:ctermbg . \' cterm=bold gui=bold' - let idguifg3 = synIDattr(synIDtrans(hlID('MoreMsg')), 'fg', 'gui') - let idctermfg3 = synIDattr(synIDtrans(hlID('MoreMsg')), 'fg', 'cterm') - " Yellow in gruvbox + if l:idctermfg2 + exec 'hi User2 ctermfg=' . l:idctermfg2 + endif + let idguifg3 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'gui') + let idctermfg3 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'cterm') + " Yellow in darcula exec 'hi User3 guifg=' . l:idguifg3 . - \' ctermfg=' . l:idctermfg3 . \' guibg=' . l:guibg . - \' ctermbg=' . l:ctermbg . \' cterm=bold gui=bold' - let idguifg4 = synIDattr(synIDtrans(hlID('Identifier')), 'fg', 'gui') - let idctermfg4 = synIDattr(synIDtrans(hlID('Identifier')), 'fg', 'cterm') - " Blue in gruvbox - exec 'hi User4 guifg=' . l:idguifg4 . - \' ctermfg=' . l:idctermfg4 . + if l:idctermfg3 + exec 'hi User3 ctermfg=' . l:idctermfg3 + endif + let idguifg4 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'gui') + let idctermfg4 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'cterm') + " Blue in darcula + exec 'hi User4 guifg=' . l:idguifg4 \' guibg=' . l:guibg . - \' ctermbg=' . l:ctermbg . \' cterm=bold gui=bold' - let idguifg5 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'gui') - let idctermfg5 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'cterm') - " Blue in gruvbox + if l:idctermfg4 + exec 'hi User4 ctermfg=' . l:idctermfg4 + endif + let idguifg5 = synIDattr(synIDtrans(hlID('Constant')), 'fg', 'gui') + let idctermfg5 = synIDattr(synIDtrans(hlID('Constant')), 'fg', 'cterm') + " Purple in darcula exec 'hi User5 guifg=' . l:idguifg5 . - \' ctermfg=' . l:idctermfg5 . \' guibg=' . l:guibg . - \' ctermbg=' . l:ctermbg . \' cterm=bold gui=bold' + if l:idctermfg5 + exec 'hi User5 ctermfg=' . l:idctermfg5 + endif + + if l:ctermbg + exec 'hi User1 ctermbg=' . l:ctermbg + exec 'hi User2 ctermbg=' . l:ctermbg + exec 'hi User3 ctermbg=' . l:ctermbg + exec 'hi User4 ctermbg=' . l:ctermbg + exec 'hi User5 ctermbg=' . l:ctermbg + endif endfunction augroup statuslineconf @@ -131,7 +144,7 @@ function! s:LinterStatus() abort let l:all_errors = l:counts.error + l:counts.style_error let l:all_non_errors = l:counts.total - l:all_errors - return l:counts.total == 0 ? '%1* OK %*' : printf( + return l:counts.total == 0 ? '%1*OK%*' : printf( \ '%%3*%dW%%* %%2*%dE%%*', \ all_non_errors, \ all_errors diff --git a/symlinks/vim/plugins.vim b/symlinks/vim/plugins.vim index 7426d9a..cd322ce 100644 --- a/symlinks/vim/plugins.vim +++ b/symlinks/vim/plugins.vim @@ -45,7 +45,7 @@ Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'mhinz/vim-grepper' Plug 'direnv/direnv.vim' -Plug 'flazz/vim-colorschemes' +Plug 'doums/darcula' Plug 'tpope/vim-speeddating' " ----------------------------------------------------------------------------- diff --git a/symlinks/vim/vimrc b/symlinks/vim/vimrc index 00d22e1..00b415b 100644 --- a/symlinks/vim/vimrc +++ b/symlinks/vim/vimrc @@ -43,7 +43,8 @@ set number set relativenumber " This has been killing vim until it was resized " set lines=50 columns=100 -colorscheme gruvbox +set termguicolors +colorscheme darcula set background=dark set guifont=SauceCodePro\ Nerd\ Font:h12