GNU bug report logs -
#67709
29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 67709 <at> debbugs.gnu.org.
--
67709: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67709
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
duplicate of 67710
[Message part 3 (message/rfc822, inline)]
From emacs -Q:
Evaluate this elisp to set up treesitter for csharp:
(setq treesit-language-source-alist '((c-sharp
"https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
treesit-load-name-override-list '((c-sharp
"libtree-sitter-csharp" "tree_sitter_c_sharp"))
major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))
Insert the following text into a csharp-ts-mode buffer:
void ExampleFunction(
int arg1,
int arg2,
int arg3,
int arg4,
int arg5
)
{
Console.WriteLine(arg1);
}
Try to indent the parameters of the function with
indent-for-tab-command. Nothing will happen.
This issue can be fixed with the following patch:
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 53c52e6..8cc4e95 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
- ((parent-is "parenthesized_expression") parent-bol
csharp-ts-mode-indent-offset))))
+ ((parent-is "parenthesized_expression") parent-bol
csharp-ts-mode-indent-offset)
+ ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))
(defvar csharp-ts-mode--keywords
'("using" "namespace" "class" "if" "else" "throw" "new" "for"
This bug report was last modified 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.