[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 5374fe3 382/459: Add some indent rules
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 5374fe3 382/459: Add some indent rules |
Date: |
Sun, 22 Aug 2021 14:00:06 -0400 (EDT) |
branch: externals/csharp-mode
commit 5374fe3ca68d4a5fada0a43963d748bf086a0dea
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>
Add some indent rules
---
csharp-mode.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/csharp-mode.el b/csharp-mode.el
index 8a37801..e5eb3ea 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -175,27 +175,33 @@ Key bindings:
'((indent-all . ;; these nodes are always indented
())
(indent-rest . ;; if parent node is one of these and node is not
first → indent
- ())
+ (namespace_declaration
+ class_declaration
+ method_declaration
+ for_each_statement
+ if_statement))
(indent-body . ;; if parent node is one of these and current node is
in middle → indent
- (declaration_list))
+ ())
(paren-indent . ;; if parent node is one of these → indent to paren
opener
())
(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"
())
(outdent . ;; these nodes always outdent (1 shift in opposite
direction)
- ())
+ ("}"))
)
)
- (setq-local indent-line-function #'tree-sitter-debug-indent-line)
- (setq tree-sitter-hl-default-patterns
+ (when (boundp 'electric-indent-inhibit)
+ (setq electric-indent-inhibit t))
+ (setq-local indent-line-function #'tree-sitter-indent-line)
+ (setq-local tree-sitter-hl-default-patterns
[(comment) @comment
(modifier) @keyword
(this_expression) @keyword
- [elpa] externals/csharp-mode 6e7922d 354/459: Update build.yml, (continued)
- [elpa] externals/csharp-mode 6e7922d 354/459: Update build.yml, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a99e43c 356/459: Update build.yml, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9f36ad6 361/459: RIP Travis, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 48b11cf 366/459: Fix issues with non-nested using-statements., ELPA Syncer, 2021/08/22
- [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 <=
- [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, 2021/08/22
- [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