GNU bug report logs - #75362
29.4; go-ts-mode.el: wrong indentation inside var list

Previous Next

Package: emacs;

Reported by: Roi Martin <jroi.martin <at> gmail.com>

Date: Sat, 4 Jan 2025 17:47:02 UTC

Severity: normal

Found in version 29.4

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 75362 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Randy Taylor <dev <at> rjt.dev>
Cc: 75362 <at> debbugs.gnu.org, Roi Martin <jroi.martin <at> gmail.com>
Subject: Re: bug#75362: 29.4; go-ts-mode.el: wrong indentation inside var list
Date: Tue, 7 Jan 2025 22:18:53 -0800

> On Jan 5, 2025, at 2:05 PM, Randy Taylor <dev <at> rjt.dev> wrote:
> 
> On Saturday, January 4th, 2025 at 10:40, Roi Martin <jroi.martin <at> gmail.com> wrote:
>> 
>> When using the Go tree-sitter grammar v0.23.4 from
>> https://github.com/tree-sitter/tree-sitter-go.git, indentation inside
>> var lists does not work correctly.
>> 
>> For instance, the following code is indented as:
>> 
>> `var ( one = 1 )`
>> 
>> Instead of:
>> 
>> `var ( one = 1 )`
>> 
>> Just in case it can help, I think this stopped working with grammar
>> version `v0.21.1`, that introduced `var_spec_list`:
>> 
>> https://github.com/tree-sitter/tree-sitter-go/compare/v0.21.0...v0.21.1
>> 
>> Please, take it with a pinch of salt because I'm not very familiar with
>> tree-sitter.
>> 
>> [...]
>> 
> 
> Thanks for the report.
> 
> The attached patch fixes it for me.<0001-Fix-go-ts-mode-var-spec-indentation-Bug-75362.patch>

Thanks Randy. Eli, should we apply this to emacs-30.

Also, what’s the general situation of grammar fixes on emacs-30? I’m asking because I fixed a grammar compatibility issue for cmake-ts-mode on master. I was going to back port it for 30.2, but it seems that simple fixes are ok for emacs-30?

Yuan



This bug report was last modified 207 days ago.

Previous Next


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