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


View this message in rfc822 format

From: Roi Martin <jroi.martin <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 75362-done <at> debbugs.gnu.org
Subject: bug#75362: 29.4; go-ts-mode.el: wrong indentation inside var list
Date: Mon, 13 Jan 2025 22:08:20 +0100
Yuan Fu <casouri <at> gmail.com> writes:

> Thanks Roi, and especially thanks for finding the change in grammar!
>
> The good news is, I just checked and it’s fixed in Emacs 30. Before then, something like this should fix it for you:
>
> (add-hook 'go-ts-mode-hook #'fix-go-ts-mode-indentation)
> (defun fix-go-ts-mode-indentation ()
>   (setf (alist-get 'go treesit-simple-indent-rules)
>         (append (alist-get 'go treesit-simple-indent-rules)
>                 '(((parent-is "var_spec_list") parent-bol go-ts-mode-indent-offset)))))

Great! Thanks a lot for landing a fix and providing a workaround!

Roi




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.