Commits

abudden  committed ea8e36f

Added option to disable duplicate checking (fixes #73).

  • Participants
  • Parent commits 09dded3

Comments (0)

Files changed (3)

File doc/TagHighlight.txt

 		Option Type: List
 		Default: [value of TagFileName option, value of ProjectConfigFileName option]
 
+	DisableDuplicateCheck                |TagHL-DisableDuplicateCheck|
+		By default, where keywords are duplicated as different types (for
+		example a function prototype and a function definition), only the
+		highest priority one (as specified in the language configuration) is
+		included in the types highlight file.  On large code-bases, this can
+		slow the generation down a bit (although it reduces the size of the
+		highlighter file and may speed Vim up somewhat).  To disable this
+		check, set this option to True or 1: in this case duplicated keywords
+		will be duplicated in the highlighter file.
+
+		Option Type: Boolean
+		Default: False (check for duplicates)
+
 	DisableStandardLibraries             *TagHL-DisableStandardLibraries*
 		If installed, the standard libraries will automatically be loaded if
 		the conditions specified in their configuration file match.  Setting

File plugin/TagHighlight/data/options.txt

 	Default:None
 	Help:Debug log file into which messages should be stored
 
+DisableDuplicateCheck:
+	CommandLineSwitches:--disable-duplicate-check
+	Type:bool
+	Default:False
+	Help:Don't check for duplicates (may speed up generation on large code-bases).
+
 LanguageTagTypes:
 	CommandLineSwitches:--language-tag-types
 	Type:dict

File plugin/TagHighlight/module/generation.py

             for keyword in tags[thisType]:
                 skip_this = False
 
-                if keyword in all_keywords:
-                    # Duplicate: skip
-                    continue
-                all_keywords.append(keyword)
+				if not options['DisableDuplicateCheck']:
+					if keyword in all_keywords:
+						# Duplicate: skip
+						continue
+					all_keywords.append(keyword)
 
                 if options['SkipReservedKeywords']:
                     if keyword in language_handler['ReservedKeywords']: