diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-11-21 19:31:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-11-21 19:31:50 +0900 |
| commit | bfcc80d8c6629c612e6d40f5cc0576a47795351a (patch) | |
| tree | 7249e741ad2b01cedfef929d139c3e4162762807 | |
| parent | f54765fcb890c2c11ac9aba97e47f8b91a35792c (diff) | |
| download | dotfiles-bfcc80d8c6629c612e6d40f5cc0576a47795351a.tar.gz dotfiles-bfcc80d8c6629c612e6d40f5cc0576a47795351a.tar.zst dotfiles-bfcc80d8c6629c612e6d40f5cc0576a47795351a.zip | |
neovim/vim: move highlight settings to my colorscheme file
| -rw-r--r-- | .config/nvim/init.lua | 32 | ||||
| -rw-r--r-- | .config/vim/my/colors/ocean.vim | 24 | ||||
| -rw-r--r-- | .vimrc | 61 |
3 files changed, 40 insertions, 77 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 56e74d3..395a4d9 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1105,34 +1105,18 @@ command! -nargs=+ -- Color scheme {{{2 --- A command which changes color scheme with fall back. vim.cmd([[ -function My_colorscheme(bang, name) - try - if get(g:, 'colors_name') isnot# a:name || a:bang - execute 'colorscheme' a:name - end - catch - " Loading colorscheme failed. - " The color scheme, "desert", is one of the built-in ones. Probably, it - " will be loaded without any errors. - colorscheme desert - endtry -endfunction -]]) - - -vim.cmd([[ -command! -bang -nargs=? - \ ColorScheme - \ call My_colorscheme(<bang>0, <q-args>) +try + colorscheme ocean +catch + " Loading colorscheme failed. + " The color scheme, "desert", is one of the built-in ones. Probably, it + " will be loaded without any errors. + colorscheme desert +endtry ]]) -vim.cmd('ColorScheme! ocean') - - - -- Statusline {{{2 diff --git a/.config/vim/my/colors/ocean.vim b/.config/vim/my/colors/ocean.vim index f220740..c7f2bda 100644 --- a/.config/vim/my/colors/ocean.vim +++ b/.config/vim/my/colors/ocean.vim @@ -139,6 +139,30 @@ hi! link WildMenu Title +hi! link YankRoundRegion DiffChange + +hi! link OperatorSandwichBuns DiffChange +hi! link OperatorSandwichStuff DiffChange +hi! link OperatorSandwichDelete DiffChange +hi! link OperatorSandwichAdd OperatorSandwichBuns + +hi EasyMotionShade guifg=#4d4d4d guibg=NONE gui=NONE cterm=NONE +hi EasyMotionTarget guifg=#ff7100 guibg=NONE gui=underline cterm=underline +hi! link EasyMotionMoveHL IncSearch + +hi statusLineModeNormal guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeInsert guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeVisual guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeOperator guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeReplace guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeCommand guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeTerminal guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineModeOther guifg=NONE guibg=NONE gui=bold cterm=bold +hi statusLineLeft guifg=#b7b7b7 guibg=#606060 gui=NONE cterm=NONE +hi statusLineRight guifg=#b7b7b7 guibg=#606060 gui=NONE cterm=NONE + + + unlet s:pallete unlet s:dark unlet s:light @@ -1178,59 +1178,14 @@ endfunction " Color scheme {{{2 -" A command which changes color scheme with fall back. -command! -bang -nargs=? - \ ColorScheme - \ call s:colorscheme(<bang>0, <q-args>) - - -function! s:colorscheme(bang, name) abort - try - if get(g:, 'colors_name') isnot# a:name || a:bang - execute 'colorscheme' a:name - endif - catch - " Loading colorscheme failed. - " The color scheme, "desert", is one of the built-in ones. Probably, it - " will be loaded without any errors. - colorscheme desert - endtry -endfunction - - -function! s:extra_highlight() abort - if &background != 'dark' - return - endif - - hi! link YankRoundRegion DiffChange - - hi! link OperatorSandwichBuns DiffChange - hi! link OperatorSandwichStuff DiffChange - hi! link OperatorSandwichDelete DiffChange - hi! link OperatorSandwichAdd OperatorSandwichBuns - - hi EasyMotionShade guifg=#4d4d4d guibg=NONE gui=NONE cterm=NONE - hi EasyMotionTarget guifg=#ff7100 guibg=NONE gui=underline cterm=underline - hi! link EasyMotionMoveHL IncSearch - - hi statusLineModeNormal guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeInsert guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeVisual guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeOperator guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeReplace guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeCommand guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeTerminal guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeOther guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineLeft guifg=#b7b7b7 guibg=#606060 gui=NONE cterm=NONE - hi statusLineRight guifg=#b7b7b7 guibg=#606060 gui=NONE cterm=NONE -endfunction - - -Autocmd ColorScheme ocean call s:extra_highlight() - - -ColorScheme! ocean +try + colorscheme ocean +catch + " Loading colorscheme failed. + " The color scheme, "desert", is one of the built-in ones. Probably, it + " will be loaded without any errors. + colorscheme desert +endtry |
