[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode abd6e07 130/496: Merge pull request #39 from ap
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode abd6e07 130/496: Merge pull request #39 from ap4y/fix_37 |
Date: |
Sun, 29 Aug 2021 11:33:22 -0400 (EDT) |
branch: elpa/swift-mode
commit abd6e07a3b2b7eff9fc124996988d82fea0940ca
Merge: b43c1e2 e168b34
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@me.com>
Merge pull request #39 from ap4y/fix_37
Don't use implicit semicolon for multi-line dot expressions
---
swift-mode.el | 3 ++-
test/indentation-tests.el | 18 ++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/swift-mode.el b/swift-mode.el
index c590853..bc96468 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -186,7 +186,8 @@
(defun swift-smie--implicit-semi-p ()
(save-excursion
- (not (or (memq (char-before) '(?\{ ?\[ ?\,))
+ (not (or (memq (char-before) '(?\{ ?\[ ?, ?.))
+ (memq (char-after (+(point) 1)) '(?.))
(looking-back swift-smie--operators-regexp (- (point) 3) t)
))))
diff --git a/test/indentation-tests.el b/test/indentation-tests.el
index 5f4d394..3b1c14f 100644
--- a/test/indentation-tests.el
+++ b/test/indentation-tests.el
@@ -774,6 +774,24 @@ Foo.bar(bar?,
|baz)
")
+(check-indentation indents-multiline-expressions/4
+ "
+let json_ary = NSJSONSerialization.
+|JSONObjectWithData(data, options: nil, error: &json_err) as NSArray
+" "
+let json_ary = NSJSONSerialization.
+ |JSONObjectWithData(data, options: nil, error: &json_err) as
NSArray
+")
+
+(check-indentation indents-multiline-expressions/5
+ "
+let json_ary = NSJSONSerialization
+|.JSONObjectWithData(data, options: nil, error: &json_err) as NSArray
+" "
+let json_ary = NSJSONSerialization
+ |.JSONObjectWithData(data, options: nil, error: &json_err) as
NSArray
+")
+
(check-indentation indents-type-annotations/1
"
typealias Foo = Bar<Foo.Baz, Foo>
- [nongnu] elpa/swift-mode 86043c2 093/496: Define electric-indent characters, (continued)
- [nongnu] elpa/swift-mode 86043c2 093/496: Define electric-indent characters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b298842 094/496: Merge pull request #26 from ap4y/electric_indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 027522d 090/496: Merge pull request #23 from ap4y/flycheck_improvements, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 20e4ecf 099/496: Merge pull request #27 from ap4y/highlight_declaration_with_destructuring, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 53f9042 100/496: Rename swift-mode--font-lock-defaults to swift-font-lock-keywords and, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 72eb603 105/496: Use semver friendly version number, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 021f0ab 104/496: Remove flycheck code from .dir-locals.el as not everyone has flycheck installed, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0c734dd 112/496: Indent multiline hash and array syntax same way as Xcode does, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 699e896 106/496: Start work on the 0.2 series, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 07f6434 111/496: Fix indentation issues with type annotations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode abd6e07 130/496: Merge pull request #39 from ap4y/fix_37,
ELPA Syncer <=
- [nongnu] elpa/swift-mode c664fc2 144/496: Merge pull request #51 from ap4y/fix_default_case_indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ce72472 141/496: Make all possible operators allowed in string interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3298fb1 169/496: Stop overriding user preferences for tab-width., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0808a2b 170/496: Add font-lock rules for access modifier keywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 52045f0 174/496: Fix issues with several failing tests on emacs 24.4, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 230afd3 175/496: Setup travis matrix with emacs 24.3 and 24.4., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5fabebd 196/496: Improve indentation rules for function arguments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 38933b9 208/496: Don't use implicit semicolon when operator is placed on the second line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d0c65bc 212/496: Fix bug with the closing parentheses in method calls and function, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 107195e 219/496: Improve lexer rule for generics with optional or implicit unwrapping, ELPA Syncer, 2021/08/29