Skip to content

Commit

Permalink
Fix indentation rules
Browse files Browse the repository at this point in the history
Fixes #247
  • Loading branch information
deathaxe committed Aug 25, 2024
1 parent b2d3c08 commit 48fb949
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Indentation Rules.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
<string>^\s*(\}|\]|else|catch|finally|else\s+if\s+\S.*)$</string>
<key>increaseIndentPattern</key>
<string>(?x)
^\s*
(.*class
|[a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;\s*$)) # function that is not one line
|[a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
|(if|while|unless)\b(?!.*?then)|(for|switch|when|loop)\b
|(else|try|finally|catch\s+\S.*|else\s+if\s+\S.*)\s*$
|.*[-=]&gt;$
|.*[\{\[]$)</string>
^\s*
( class\b
| [a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;\s*$)) # function that is not one line
| [a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
| (if|while|unless)\b(?!.*?then)|(for|switch|when|loop)\b
| (else|try|finally|catch\s+\S.*|else\s+if\s+\S.*)\s*$
| .*[-=]&gt;$
| .*[\{\[]$
)
</string>
</dict>
</dict>
</plist>

0 comments on commit 48fb949

Please sign in to comment.