GNU bug report logs - #75785
30.0.93: grouped type declarations fail to indent in go-ts-mode

Previous Next

Package: emacs;

Reported by: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>

Date: Thu, 23 Jan 2025 13:11:02 UTC

Severity: normal

Found in version 30.0.93

Done: Eli Zaretskii <eliz <at> gnu.org>

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: Randy Taylor <dev <at> rjt.dev>
Cc: gerard.vermeulen <at> posteo.net, casouri <at> gmail.com, 75785 <at> debbugs.gnu.org
Subject: bug#75785: 30.0.93: grouped type declarations fail to indent in go-ts-mode
Date: Thu, 23 Jan 2025 18:42:05 +0200
> Date: Thu, 23 Jan 2025 16:22:37 +0000
> From: Randy Taylor <dev <at> rjt.dev>
> Cc: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>, Yuan Fu <casouri <at> gmail.com>, 75785 <at> debbugs.gnu.org
> 
> On Thursday, January 23rd, 2025 at 09:56, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 
> > 
> > > Date: Thu, 23 Jan 2025 13:09:45 +0000
> > 
> > > From: Gerard Vermeulen gerard.vermeulen <at> posteo.net
> > > 
> > > Hi,
> > > 
> > > Automatic indenting when typing works in go-ts-mode for grouped
> > > var declarations like:
> > > 
> > > var (
> > > a = 1
> > > b = 2
> > > )
> > > 
> > > but not for type declarations (taken from
> > > https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
> > > ) like:
> > > 
> > > type (
> > > Area float64
> > > Volume float64
> > > )
> > > 
> > > where I have to add the tabs (or spaces) myself.
> > > I tried to change "type_spec" to "type_spec_list" in the defvar
> > > go-ts-mode--indent-rules expression, but that did not fix it.
> > > 
> > > I am using a recent 30.0.93 git checkout.
> > > 
> > > Can it be fixed?
> > 
> > 
> > Randy and Yuan, could you please look into this?
> 
> Thanks for the report.
> 
> The attached patch fixes it for me.

Thanks, installed on the emacs-30 release branch.




This bug report was last modified 171 days ago.

Previous Next


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