From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Date: Thu, 28 Dec 2023 09:04:13 +0100 Message-ID: <87mstuvjlu.fsf@thornhill.no> References: <83v88yml4h.fsf@gnu.org> <83o7ehe1fu.fsf@gnu.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35667"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jacobtophatleeming@gmail.com, 67709@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 28 09:05:26 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 1rIlOP-00094J-95 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Dec 2023 09:05:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIlO5-00040a-Rq; Thu, 28 Dec 2023 03:05:05 -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 1rIlO3-00040N-Mx for bug-gnu-emacs@gnu.org; Thu, 28 Dec 2023 03:05:03 -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 1rIlO3-0001sv-E8 for bug-gnu-emacs@gnu.org; Thu, 28 Dec 2023 03:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIlO2-0004QY-Gl for bug-gnu-emacs@gnu.org; Thu, 28 Dec 2023 03:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Dec 2023 08:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67709 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67709-submit@debbugs.gnu.org id=B67709.170375066116956 (code B ref 67709); Thu, 28 Dec 2023 08:05:02 +0000 Original-Received: (at 67709) by debbugs.gnu.org; 28 Dec 2023 08:04:21 +0000 Original-Received: from localhost ([127.0.0.1]:38363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIlNM-0004PP-Un for submit@debbugs.gnu.org; Thu, 28 Dec 2023 03:04:21 -0500 Original-Received: from out-184.mta1.migadu.com ([95.215.58.184]:61046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIlNL-0004PG-Fd for 67709@debbugs.gnu.org; Thu, 28 Dec 2023 03:04:20 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1703750658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uep4ZpDcSXKIvmivEaZytklz/ZddlFsO4P9i0Z7CdZ4=; b=aEqr9wGJDfg4EmPaYLrkRlNH8xOdkOXYvNyzDFxLeyzGbUDYm+CNGlhp466biUEzKU7m/G bP35VPq4NXQeUENIxKDgjTwUA4WCE7Zeqn7FKsXByZAVseHaAyoGlQYICIS14yda5u5OOF KoD3cUckJzaWuW7MAWJJXtMBljwsYOnLOuX7CbbPe1g8O0n2Rpcqgqk4bqpAsiVvLQbM2p g3RQuZZv27atDp7gIAntJWm2gwywZFwJwMVPBXM60fHsnF6ojU9z3QXR7g/s69zxJx12CM ty+Vf3wmtZ6G2Iz4lltzVQ1bvhhz66bfN/0LsO53SaOpHBmcbqyWK/ng1H6rXQ== In-Reply-To: <83o7ehe1fu.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT 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:276960 Archived-At: Eli Zaretskii writes: > Ping! Theo, could you please look into this? > Absolutely, thanks! Theo >> Cc: 67709@debbugs.gnu.org >> Date: Sat, 16 Dec 2023 13:39:58 +0200 >> From: Eli Zaretskii >> >> > From: Jacob Leeming >> > 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. >> >> >> >>