[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 27cd2e8 456/459: Align argument to siblings
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 27cd2e8 456/459: Align argument to siblings |
Date: |
Sun, 22 Aug 2021 14:00:21 -0400 (EDT) |
branch: externals/csharp-mode
commit 27cd2e8da1f374fd9db121826bf78484b0e4079e
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>
Align argument to siblings
---
csharp-tree-sitter.el | 102 +++++++++++++++++++++++++-------------------------
1 file changed, 51 insertions(+), 51 deletions(-)
diff --git a/csharp-tree-sitter.el b/csharp-tree-sitter.el
index 8c0bd99..e4c6cb3 100644
--- a/csharp-tree-sitter.el
+++ b/csharp-tree-sitter.el
@@ -284,57 +284,57 @@
:group 'csharp)
(defvar tree-sitter-indent-csharp-tree-sitter-scopes
- '((indent-all . ;; these nodes are always indented
- (accessor_declaration
- break_statement
- arrow_expression_clause
- parameter_list
- conditional_expression
- constructor_initializer
- argument_list
- "."))
- (indent-rest . ;; if parent node is one of these and node is not first →
indent
- (
- binary_expression
- switch_section
- ))
- (indent-body . ;; if parent node is one of these and current node is in
middle → indent
- (enum_member_declaration_list
- base_list
- block
- anonymous_object_creation_expression
- initializer_expression
- expression_statement
- declaration_list
- attribute_argument_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
- (parameter))
-
- (multi-line-text . ;; if node is one of these, then don't modify the indent
- ;; this is basically a peaceful way out by saying "this
looks like something
- ;; that cannot be indented using AST, so best I leave it
as-is"
- (comment
- preprocessor_call
- labeled_statement))
- (outdent . ;; these nodes always outdent (1 shift in opposite direction)
- (;; "}"
- case_switch_label
-
- ))
-
- (align-to-node-line . ;; this group has lists of alist (node type . (node
types... ))
- ;; we move parentwise, searching for one of the node
- ;; types associated with the key node type. if found,
- ;; align key node with line where the ancestor node
- ;; was found.
- ((block . (lambda_expression))))
- )
+ '((indent-all
+ ;; these nodes are always indented
+ . (accessor_declaration
+ break_statement
+ arrow_expression_clause
+ parameter_list
+ conditional_expression
+ constructor_initializer
+ argument_list
+ "."))
+ (indent-rest
+ ;; if parent node is one of these and node is not first → indent
+ . (binary_expression
+ switch_section))
+ (indent-body
+ ;; if parent node is one of these and current node is in middle → indent
+ . (enum_member_declaration_list
+ base_list
+ block
+ anonymous_object_creation_expression
+ initializer_expression
+ expression_statement
+ declaration_list
+ attribute_argument_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
+ . (parameter
+ argument))
+ (multi-line-text
+ ;; if node is one of these, then don't modify the indent
+ ;; this is basically a peaceful way out by saying "this looks like
something
+ ;; that cannot be indented using AST, so best I leave it as-is"
+ . (preprocessor_call
+ labeled_statement))
+ (outdent
+ ;; these nodes always outdent (1 shift in opposite direction)
+ . (case_switch_label))
+ (align-to-node-line
+ ;; this group has lists of alist (node type . (node types... ))
+ ;; we move parentwise, searching for one of the node
+ ;; types associated with the key node type. if found,
+ ;; align key node with line where the ancestor node
+ ;; was found.
+ . ((block . (lambda_expression)))))
"Scopes for indenting in C#.")
;;; tree-sitter helper-functions. navigation, editing, etc.
- [elpa] externals/csharp-mode 1c2b9cb 442/459: Add more nodes to beginning/end-of-defun, (continued)
- [elpa] externals/csharp-mode 1c2b9cb 442/459: Add more nodes to beginning/end-of-defun, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d942b27 441/459: Add tree-sitter based utility methods. (#232), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f977800 443/459: Add indentation settings for lambda functions (#229), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 40c183e 452/459: Adjust wording in readme, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2641599 454/459: Fix spectacular mis-edit of readme, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 26f1f8c 457/459: Add switch_expression, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 69fe52b 453/459: Version bump, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0edf059 445/459: Fix ci (#234), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode dd30649 459/459: Bump version, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 299d3f1 450/459: Don't require tree-sitter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 27cd2e8 456/459: Align argument to siblings,
ELPA Syncer <=
- [elpa] externals/csharp-mode 573f23c 458/459: Assign copyright over to the FSF, ELPA Syncer, 2021/08/22