abudden avatar abudden committed cd5606d

Added the ability to set options for non-project code.

Comments (0)

Files changed (3)


 		let b:TagHighlightSettings = {}
+	let b:TagHighlightPrivate['InProject'] = 0
 	for name in keys(projects)
 		let project = projects[name]
 		if TagHighlight#Utilities#FileIsIn(full_path, project['SourceDir'])
+	if ! b:TagHighlightPrivate['InProject']
+		call TagHLDebug("Not in project: '".name."'", "Information")
+		let npo = TagHighlight#Option#GetOption("NonProjectOptions")
+		let b:TagHighlightSettings = extend(b:TagHighlightSettings, npo)
+	endif


 		UseProjectRepository             Link:|TagHL-UseProjectRepository|
 			Enable storing of tags and types files in central repository.
+		NonProjectOptions                Link:|TagHL-NonProjectOptions|
+			Options to set for files that aren't part of a project.
 		PreReadHooks                     Link:|TagHL-PreReadHooks|
 		Option Type: Boolean
 		Default: False (always generate types file)
+	NonProjectOptions                    *TagHL-NonProjectOptions*
+		This is a special option that contains a nested dictionary.  It is
+		used in combination with the |TagHL-Projects| option: see the
+		documentation for that option for more details.  This option allows
+		options to be set for any file that is not part of one of the projects
+		specified in the Projects option.
+		Option Type: Dictionary
+		Default: {}
 	ParsingSkipList                      *TagHL-ParsingSkipList*
 		If you're editing a lot of files and for most you want tag highlight
 		to run but one or two you don't, put the filenames of the ones for
+			NonProjectOptions:
+				# Options for code that isn't in one of
+				# the projects specified above:
+				IncludeLocals:True
 		Option Type: Dictionary
 		Default: {}
 	  rather than with the code itself (thanks to Alexey Radkov for the
 	  suggestion and for TagManager plugin that shows how it's done!)
 	* Added the ability to use a project in place of a user library.
+	* Added non-project options for project users who want different options
+	  for files that aren't part of a project.
 	Bug fixes:


 	Help:Project-specific configuration options.
+	Type:dict
+	Default:{}
+	Help:Configuration options for code that's not part of a project.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.