GNU bug report logs - #77803
tsx-ts-mode: wrong indentation for variables declarations

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Mon, 14 Apr 2025 15:43:01 UTC

Severity: normal

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: Eli Zaretskii <eliz <at> gnu.org>
To: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
Cc: dmitry <at> gutov.dev, 77803 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: bug#77803: [PATCH v2] Don't indent variable names to their declarator expression (bug#77803)
Date: Sat, 19 Apr 2025 10:45:23 +0300
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Date: Sat, 19 Apr 2025 08:46:11 +0300
> 
> > So it's hard to call the current indentation incorrect. Could use a
> > user 
> > option. Maybe take js2-pretty-multiline-declarations as an example.
> 
> Interesting point btw, is there docs how to customize tree-sitter
> indentation? I looked around and found this post¹, however it's
> specific to c-ts-mode, because it relies on `c-ts-mode-indent-style`
> function.

C/C++ indentation styles are indeed specific to c-ts-mode, but nothing
prevents us from having a similar command in other modes.  Not every
major mode wants to support several indentation styles, so I'm not
sure a global treesit-level facility is justified.




This bug report was last modified 73 days ago.

Previous Next


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