diff options
Diffstat (limited to 'core/autocommands.vim')
| -rw-r--r-- | core/autocommands.vim | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/core/autocommands.vim b/core/autocommands.vim index 8e9f8f2..6f25e79 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -56,24 +56,27 @@ augroup END " highlight yanked region, see `:h lua-highlight` augroup custom_highlight autocmd! - autocmd ColorScheme * highlight YankColor ctermfg=59 ctermbg=41 guifg=#34495E guibg=#2ECC71 + autocmd ColorScheme * call s:custom_highlight() augroup END -augroup highlight_yank - autocmd! - au TextYankPost * silent! lua vim.highlight.on_yank{higroup="YankColor", timeout=300} -augroup END +function! s:custom_highlight() abort + " For yank highlight + highlight YankColor ctermfg=59 ctermbg=41 guifg=#34495E guibg=#2ECC71 -" Highlight groups for cursor color -augroup cursor_color - autocmd! - autocmd ColorScheme * highlight Cursor cterm=bold gui=bold guibg=#00c918 guifg=black - autocmd ColorScheme * highlight Cursor2 guifg=red guibg=red -augroup END + " For cursor colors + highlight Cursor cterm=bold gui=bold guibg=#00c918 guifg=black + highlight Cursor2 guifg=red guibg=red -augroup float_border_color + " For floating windows border highlight + highlight FloatBorder guifg=LightGreen guibg=NONE + + " highlight for matching parentheses + highlight MatchParen cterm=underline gui=underline +endfunction + +augroup highlight_yank autocmd! - autocmd ColorScheme * highlight FloatBorder guifg=LightGreen guibg=NONE + au TextYankPost * silent! lua vim.highlight.on_yank{higroup="YankColor", timeout=300, on_visual=false} augroup END augroup auto_close_win |
