[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 5a3d4a9 396/459: More indentation fixes
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 5a3d4a9 396/459: More indentation fixes |
Date: |
Sun, 22 Aug 2021 14:00:09 -0400 (EDT) |
branch: externals/csharp-mode
commit 5a3d4a92737d0eb8db5118630f6838243971ddbb
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>
More indentation fixes
---
csharp-mode-indent.el | 6 +++++-
csharp-mode.el | 5 +++--
test-files/indentation-tests.cs | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/csharp-mode-indent.el b/csharp-mode-indent.el
index 03ec002..0661032 100644
--- a/csharp-mode-indent.el
+++ b/csharp-mode-indent.el
@@ -37,6 +37,8 @@
'((indent-all . ;; these nodes are always indented
(accessor_declaration
break_statement
+ conditional_expression
+ arrow_expression_clause
"."))
(indent-rest . ;; if parent node is one of these and node is not first →
indent
(
@@ -49,10 +51,12 @@
initializer_expression
expression_statement
declaration_list
+ attribute_argument_list
+ parameter_list
switch_body))
(paren-indent . ;; if parent node is one of these → indent to paren opener
- ())
+ (parenthesized_expression))
(align-char-to . ;; chaining char → node types we move parentwise to find
the first chaining char
())
(aligned-siblings . ;; siblings (nodes with same parent) should be aligned
to the first child
diff --git a/csharp-mode.el b/csharp-mode.el
index 8798974..f6d84d5 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -191,13 +191,14 @@ Key bindings:
"default" "typeof" "try" "catch" "finally" "break"
"foreach" "in" "yield" "get" "set" "when" "as" "out"
"is" "while" "continue" "this" "ref" "goto" "interface"
+ "from" "where" "select"
] @keyword
;; Linq
- (from_clause (identifier) @variable) @keyword
+ (from_clause (identifier) @variable)
(group_clause)
(order_by_clause)
- (select_clause)
+ (select_clause (identifier) @variable)
(query_continuation (identifier) @variable) @keyword
;; String
diff --git a/test-files/indentation-tests.cs b/test-files/indentation-tests.cs
index d4833da..837dd54 100644
--- a/test-files/indentation-tests.cs
+++ b/test-files/indentation-tests.cs
@@ -255,3 +255,43 @@ public async Task WriteAsync()
}
}
}
+
+namespace Foo
+{
+ internal T GetThings()
+ {
+ private Thing<int> Values(string key, int[] numbers, bool ignoreCase)
+ {
+ return (from n in numbers
+ where string.Equals("", "")
+ select n);
+ }
+
+ private string GetKey(int number, bool randomCase)
+ {
+ if (randomCase)
+ {
+ bool upper = false
+ return (upper ? "AA" : "aa");
+ }
+ else
+ {
+ return "AA" + Right2Chars(number.ToString());
+ }
+ }
+ }
+}
+
+namespace Foo
+{
+ internal T GetAssemblies()
+ {
+ static string GetRelativePath(string path, Uri baseUri)
+ {
+ var rootedPath = Path.IsPathRooted(path)
+ ? path
+ : x;
+ return rootedPath;
+ }
+ }
+}
- [elpa] externals/csharp-mode 064a3a3 368/459: Fix detection of xUnit test-failures in compilation-mode, (continued)
- [elpa] externals/csharp-mode 064a3a3 368/459: Fix detection of xUnit test-failures in compilation-mode, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4aedd56 372/459: More basic highlighting, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 383f020 375/459: Attributes and more interpolation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1bd2d62 377/459: Make attribute-fontification consistent, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0ebd21a 381/459: Remove CC Mode and add tree-sitter-indent :O, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b6b7661 380/459: Add this expression, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5374fe3 382/459: Add some indent rules, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 878c671 390/459: Try add better support for interfaces., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e30ed5e 393/459: Indent feature parity with previous implementation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 45d1e9f 395/459: These are passing again, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5a3d4a9 396/459: More indentation fixes,
ELPA Syncer <=
- [elpa] externals/csharp-mode 0b1df32 398/459: Add tree-sitter as optional feature, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f0b5efa 403/459: Use code with same arrangement as before rework, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 53fa8f1 404/459: Use dedicated major mode for tree-sitter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ea1718e 405/459: Use defvar instead of defcustom for indentation rules, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5ddb761 406/459: Fix url and indentation., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 76bbf26 408/459: Merge pull request #206 from jcs-PR/minor, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f937426 409/459: Merge branch 'master' into tree-sitter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3cff337 411/459: Merge pull request #204 from emacs-csharp/tree-sitter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4947497 412/459: Update readme to reflect tree-sitter in master, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 064f481 418/459: Fix autoload for tree-sitter support (#211), ELPA Syncer, 2021/08/22