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#66159: 30.0.50; lua-ts-mode semantic indentation problems Date: Sun, 24 Sep 2023 18:44:54 +0300 Message-ID: <83jzsf379l.fsf@gnu.org> References: <87fs36vvxl.fsf@gmail.com> <87v8bz3905.fsf@pub.pink> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20099"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andreyorst@gmail.com, 66159@debbugs.gnu.org To: john muhl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 17:46:17 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 1qkRJJ-000561-2V for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 17:46:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkRJ5-0006M8-F1; Sun, 24 Sep 2023 11:46:03 -0400 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 1qkRIv-0006Ja-SY for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 11:46:01 -0400 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 1qkRIs-0007lf-76 for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 11:45:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkRJ4-00059y-1H for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 11:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66159 X-GNU-PR-Package: emacs Original-Received: via spool by 66159-submit@debbugs.gnu.org id=B66159.169557034319808 (code B ref 66159); Sun, 24 Sep 2023 15:46:02 +0000 Original-Received: (at 66159) by debbugs.gnu.org; 24 Sep 2023 15:45:43 +0000 Original-Received: from localhost ([127.0.0.1]:43472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkRIl-00059Q-5r for submit@debbugs.gnu.org; Sun, 24 Sep 2023 11:45:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkRIj-00059D-Tw for 66159@debbugs.gnu.org; Sun, 24 Sep 2023 11:45:42 -0400 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 1qkRIS-0007ix-O6; Sun, 24 Sep 2023 11:45:24 -0400 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=UJuYTD147jxn4R7ocWHWCNvGFQLzbuES0ngkJoXSPT0=; b=OTlumarOOwLb vV8PswKsS5IN7N2T+4b5ItQAKK/X6DSVqgO9oDoa7ujAXswQ6yv4KZrs8l18igk7uviSU8iHNlXSh bp1UWw1RJIxsNO4yX4q2aGfCavdp7M1zMrSfuchdCdw4Ob2xhduKBK4Ds2mdcYs5wJ0fUZb7+if/O cw5fuLOR59H95Bzo/XsuAFWVGTNA8vCXlEa2LXMWNqhwXgyfwWt0nwu52bMaATju3MoB/hS+2O/2N liTk4x/efvXg2k4yGY5Y95BuD8CNI6V+0l7DSXtpSkOCHhWEgaOS72YZ9Uo5ta5z1ydacdSJD0e2v f0umewvVgOKrGCAGuZPmCg==; In-Reply-To: <87v8bz3905.fsf@pub.pink> (bug-gnu-emacs@gnu.org) 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:271258 Archived-At: > Cc: 66159@debbugs.gnu.org > Date: Sun, 24 Sep 2023 10:06:50 -0500 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > Another thing that bothers me is that I prefer Gassanenko-style packing > > of `end' keywords so that they vertically align with the scope of the > > opened block, as it saves so much vertical space and is easier for me to > > read, but lua-ts-mode moves it to the latest innermost indentation > > level, as opposed to the outermost depending on the count of ends in the > > line itself: > > > > function lowest_entropy_cell(world) > > | local lowest,res=math.huge,nil > > | for y=1,world.height do > > | | for x=1,world.width do > > | | | local cell=world:get(x,y) > > | | | if cell.is_set then > > | | | | local e=cell_enthropy(cell) > > | | | | trace(e) > > | | | | if e <= lowest then > > | | | | | lowest,res=e,{x,y} > > | end end end end > > | return res or {math.random(world.width),math.random(world.height)} > > end > > I don't see any reason not to support that style but I'm not sure how to > do it. A patch would be welcome but I'll try to figure it out sometime. Maybe introduce indentation styles into lua-ts-mode, like CC Mode and c-ts-mode have?