From 48fb9491387a4b8cbe5cfb3109b90debeac9b999 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sun, 25 Aug 2024 15:51:34 +0200 Subject: [PATCH] Fix indentation rules Fixes #247 --- Indentation Rules.tmPreferences | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Indentation Rules.tmPreferences b/Indentation Rules.tmPreferences index da64f2e..5922b59 100644 --- a/Indentation Rules.tmPreferences +++ b/Indentation Rules.tmPreferences @@ -10,14 +10,16 @@ ^\s*(\}|\]|else|catch|finally|else\s+if\s+\S.*)$ increaseIndentPattern (?x) - ^\s* - (.*class - |[a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)>\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*$ - |.*[-=]>$ - |.*[\{\[]$) + ^\s* + ( class\b + | [a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)>\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*$ + | .*[-=]>$ + | .*[\{\[]$ + ) +