[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode cba4538 161/496: Merge pull request #61 from ck
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode cba4538 161/496: Merge pull request #61 from ckruse/fix_55 |
Date: |
Sun, 29 Aug 2021 11:33:28 -0400 (EDT) |
branch: elpa/swift-mode
commit cba45387fa1e9fcb33be203bc2a3cdda6ce5f830
Merge: 9cf667c 67fd6a9
Author: Arthur Evstifeev <mail@ap4y.me>
Commit: Arthur Evstifeev <mail@ap4y.me>
Merge pull request #61 from ckruse/fix_55
Fix #55: indentation of multiline operator expressions
---
swift-mode.el | 3 ++-
test/indentation-tests.el | 13 +++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/swift-mode.el b/swift-mode.el
index 449d134..2602d26 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -286,7 +286,8 @@
;; Apply swift-indent-multiline-statement-offset if
;; operator is the last symbol on the line
(`(:before . "OP")
- (if (looking-at ".[\n]")
+ (if (and (looking-at ".[\n]")
+ (not (smie-rule-sibling-p)))
(smie-rule-parent swift-indent-multiline-statement-offset)))
;; Indent second line of the multi-line class
diff --git a/test/indentation-tests.el b/test/indentation-tests.el
index 1c4b1fb..cb810b1 100644
--- a/test/indentation-tests.el
+++ b/test/indentation-tests.el
@@ -919,6 +919,19 @@ let foo = bar >
|baz
")
+(check-indentation indents-multiline-operators-only-once
+ "
+1 +
+ 2 + 5 *
+|3
+" "
+1 +
+ 2 + 5 *
+ |3
+"
+)
+
+
(provide 'indentation-tests)
;;; indentation-tests.el ends here
- [nongnu] elpa/swift-mode 14c6bdd 079/496: Add swift repl commands to mode map, (continued)
- [nongnu] elpa/swift-mode 14c6bdd 079/496: Add swift repl commands to mode map, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1dfb1a5 110/496: Add indent rules for function declaration with attributes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1a1d81c 125/496: Improve font-lock regex for string interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 4059bc1 135/496: Add dot(.) to the allowed symbols inside string interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 88a83ad 145/496: Apply DECSPEC token class only for functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fc009b5 069/496: Add font locking for indentation tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ae32a8b 071/496: Add basic imenu support, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d02e2dc 024/496: Update contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fc64626 156/496: Merge pull request #56 from ap4y/fix_flycheck_issues, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9cf667c 159/496: Start work on 0.4, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cba4538 161/496: Merge pull request #61 from ckruse/fix_55,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 5611c0f 164/496: Updated syntax: a lot of attributes moved to keywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 250e8e4 172/496: Merge pull request #67 from jmibanez/fix-flycheck-and-byte-compilation-bug, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a6267eb 189/496: Improve indentation for the function definitions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 782378c 214/496: Correct regex in lexer for the "default" keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c38b721 216/496: Support default values for arguments in function declaration, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2cb54c9 222/496: Make grammar for if statement a bit more precise, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b6bad10 225/496: Set minimum required version to 24.4, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 4a27477 230/496: Merge pull request #89 from uk-ar/fix-indent-in-trailing-closure, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 4289bd7 235/496: Fix implicit semicolon rule, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a29398b 239/496: Fix half-open range operator, ELPA Syncer, 2021/08/29