2 " Author: A. S. Budden <abudden _at_ gmail _dot_ com>
3 " Copyright: Copyright (C) 2009-2011 A. S. Budden
4 " Permission is hereby granted to use and distribute this code,
5 " with or without modifications, provided that this copyright
6 " notice is copied with it. Like anything else that's free,
7 " the TagHighlight plugin is provided *as is* and comes with no
8 " warranty of any kind, either expressed or implied. By using
9 " this plugin, you agree that in no event will the copyright
10 " holder be liable for any damages resulting from the use
13 " ---------------------------------------------------------------------
15 if &cp || v:version < 700 || (exists('g:loaded_TagHLSpecialHandlers') && (g:plugin_development_mode != 1))
16 throw "Already loaded"
21 let g:loaded_TagHLSpecialHandlers = 1
23 function! TagHighlight#SpecialHandlers#CRainbowHandler()
24 call TagHLDebug("Language handler for rainbow.vim compatibility", "Information")
25 if exists("b:hlrainbow") && ! exists("g:nohlrainbow")
26 " Use a dictionary as a set (a unique item list)
28 for key in ["c","c++"]
29 if has_key(g:TagHighlightPrivate['Kinds'], key)
30 for kind in values(g:TagHighlightPrivate['Kinds'][key])
31 let hl_dict[kind] = ""
35 let all_kinds = keys(hl_dict)
36 for cluster in ["cBracketGroup","cCppBracketGroup","cCurlyGroup","cParenGroup","cCppParenGroup"]
37 exe 'syn cluster' cluster 'add=' . join(all_kinds, ',')
42 function! TagHighlight#SpecialHandlers#JavaTopHandler()
43 call TagHLDebug("Language handler for javaTop compatibility", "Information")
44 if has_key(g:TagHighlightPrivate['Kinds'], 'java')
45 exe 'syn cluster javaTop add=' . join(values(g:TagHighlightPrivate['Kinds']['java']), ',')