<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
	<key>name</key>
	<string>Indentation Rules</string>
	<key>scope</key>
	<string>source.go</string>
	<key>settings</key>
	<dict>
		<key>decreaseIndentPattern</key>
		<string><![CDATA[(?x)
		^                               # start of line
		(.*\*/)?                        # skip comments if present
		(                               # three possibilities
			\s* \}                      # whitespace and a closing curly brace
			(                           # capture:
				[^}{"']* \{             # anything other than curly braces or quotes, then open curly
			)?                          # (optional)
			[;\s]*?                     # any whitespace or semicolons
			|
			(?:\s* (case|default).*:)   # case statements pop back one indent
			|
			(?: \) (?<! \( ) )          # closing braces not preceded by opening braces
		)
		(//.*|/\*.*\*/\s*)?             # skip any comments (optional)
		$                               # end of line
		]]></string>
		<key>increaseIndentPattern</key>
		<string>(?x)
		^
		(?: .* \*/ )?                   # skip any comments
		(?:
			(.* \{ [^}"'\n]*)           # lines containing an open curly but no quotes or close curly
			|                           # OR
			(?:\s* (case|default).*:)   # case statements
			|                           # OR
			(.* \( [^)"'\n]*)           # lines containing an open brace but no quotes or close brace
		)
		(//.*|/\*.*\*/\s*)?             # skip any comments (optional)
		$
		</string>
		<!--
		<key>indentNextLinePattern</key>
		<string>(?x)^
		(?! .* [;:{}]                    # do not indent when line ends with ;, :, {, or }
			\s* (//|/[*] .* [*]/ \s* $)  #  …account for potential trailing comment
		)
		</string>
		-->
		<key>unIndentedLinePattern</key>
		<string>^\s*((/\*|\*/|//|import\b.*|package\b.*).*)?$</string>
	</dict>
</dict>
</plist>
