bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67709: 29.1.50; [patch] missing indent rule for parameter list in cs


From: Theodor Thornhill
Subject: bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
Date: Sat, 20 Jan 2024 10:10:57 +0100

It is on my list, but I'm in the process of moving houses. When we're settled in a few days I'll pick the relevant bugs up again.

Pardon the delay - life's been getting in the way, but rest assured, I'll get the them (unless someone does it before the end of next week)

:)

Theo

On Jan 20, 2024 10:05, Eli Zaretskii <eliz@gnu.org> wrote:

Ping! Ping! Any progress there?

> Cc: jacobtophatleeming@gmail.com, 67709@debbugs.gnu.org
> Date: Tue, 09 Jan 2024 21:59:41 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > From: Theodor Thornhill <theo@thornhill.no>
> > Cc: jacobtophatleeming@gmail.com, 67709@debbugs.gnu.org
> > Date: Thu, 28 Dec 2023 09:04:13 +0100
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > > Ping!  Theo, could you please look into this?
> > >
> >
> > Absolutely, thanks!
>
> Any progress?
>
> > >> Cc: 67709@debbugs.gnu.org
> > >> Date: Sat, 16 Dec 2023 13:39:58 +0200
> > >> From: Eli Zaretskii <eliz@gnu.org>
> > >>
> > >> > From: Jacob Leeming <jacobtophatleeming@gmail.com>
> > >> > Date: Fri, 8 Dec 2023 13:44:14 +0000
> > >> >
> > >> > >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"
> > >>
> > >> Theo, any comments?  Should I install this?
> > >>
> > >> Thanks.
> > >>
> > >>
> > >>
> > >>
> >
>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]