From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67710: [PATCH] 29.1.50 missing indent rule for parameter list in csharp-ts-mode Date: Fri, 08 Dec 2023 16:37:11 +0200 Message-ID: <83plzgzroo.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36197"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67710@debbugs.gnu.org To: Jacob Leeming Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 08 15:38:42 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rBc00-00098Y-IY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Dec 2023 15:38:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBbzJ-0006KR-7M; Fri, 08 Dec 2023 09:37:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBbzD-0006Ib-Qg for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2023 09:37:51 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBbzC-0007i0-S1 for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2023 09:37:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBbzP-0005QR-Os for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2023 09:38:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2023 14:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67710 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67710-submit@debbugs.gnu.org id=B67710.170204624820730 (code B ref 67710); Fri, 08 Dec 2023 14:38:03 +0000 Original-Received: (at 67710) by debbugs.gnu.org; 8 Dec 2023 14:37:28 +0000 Original-Received: from localhost ([127.0.0.1]:44268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBbyq-0005OD-0S for submit@debbugs.gnu.org; Fri, 08 Dec 2023 09:37:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBbyn-0005No-EQ; Fri, 08 Dec 2023 09:37:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBbyV-0007IS-1Q; Fri, 08 Dec 2023 09:37:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iO53iJiEVECsuOxPgLiRuug0HB9wgI64CIpqIzn1ia8=; b=Hd9EztOfU3cC e1vSyEhnkM/YRonuHyqETmaZ9yuHgqunF7aSohz8Mff5+iZiRunxfzT8WO35mtGNXsiy9LHWhSHB+ 2fIGilUwE3tWCeXM58dRahYKucvfkNyoZxB1p/uf7jfSH9/grW2Buq3dYxzGxwycBWpCp33Ns/WDA p5nT7IBBfns6Fxob8z8fDnb9mp/tcxJcEKZ1YAfoWdzKEJCWg0cPDTYCqiuBlSeehU5l06uKeIups 1KijjOd8VkxBV/G8fwzLyOzu/acRUqSDeIUwYW1S5Z/xE6lyqJyQSQvMomK7DN+yNIpN2WZ9K2KF3 NFZaKpGbdF4dWEemAhWdiQ==; In-Reply-To: (message from Jacob Leeming on Fri, 8 Dec 2023 14:12:28 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275779 Archived-At: merge 67710 67709 thanks > From: Jacob Leeming > Date: Fri, 8 Dec 2023 14:12:28 +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" This is an exact duplicate of bug#67709. Merging.