Skip to content

mcchrish/extend-highlight.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extend-highlight.vim

Installation

Plug 'mcchrish/extend-highlight.vim'

Usage

" ALEVirtualTextError will copy the highlights of Function then replaces/add
" 'gui' configuration
:call extend_highlight#extend('Function', 'ALEVirtualTextError', { 'gui': ['italic'] })

" Adding a + will append/add existing highlights instead of replace
:call extend_highlight#extend('TypeDef', 'ALEVirtualTextWarning', { '+gui': ['italic'] })

" OR

" An autocommand for VimEnter and ColorScheme will be registered and calls
" extend_highlight#extend for each item in this list. You can turn it off by
" setting g:extend_highlight#register_autocmd to 0.

let g:extend_highlight#extend_list = [
      \ ['Function', 'ALEVirtualTextError', { 'gui': ['italic'] }],
      \ ['TypeDef', 'ALEVirtualTextWarning', { 'gui': ['italic'] }],
      \ ['ErrorMsg', 'ALEError', { '+gui': ['italic'] }],
      \ ['ErrorMsg', 'ALEWarning', { '+gui': ['italic'] }]
      \ ]

Note: please see :help extend-highlight for complete manual.

Some other example: https://github.com/mcchrish/dotfiles/blob/189c42107e6611923a06a9368a978266430b200c/vim/.config/nvim/plugin/colors.vim#L13-L25

Inspired by an answer from StackOverflow: https://stackoverflow.com/a/5961837

About

Utility plugin to extended/override vim highlight groups

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published