GNU bug report logs - #66159
30.0.50; lua-ts-mode semantic indentation problems

Previous Next

Package: emacs;

Reported by: Andrey Listopadov <andreyorst <at> gmail.com>

Date: Fri, 22 Sep 2023 19:41:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: andreyorst <at> gmail.com, 66159 <at> debbugs.gnu.org
Subject: bug#66159: 30.0.50; lua-ts-mode semantic indentation problems
Date: Sun, 24 Sep 2023 18:44:54 +0300
> Cc: 66159 <at> 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" <bug-gnu-emacs <at> gnu.org>
> 
> > 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?




This bug report was last modified 1 year and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.