Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their declarator expression (bug#77803)

From: Yuan Fu <[email-masked]>
Date: Fri, 25 Apr 2025 17:44:55 -0700

> On Apr 21, 2025, at 3:43 PM, Dmitry Gutov <[email-masked]> wrote:
> 
> On 20/04/2025 07:36, Yuan Fu wrote:
>> I can add a custom option that toggle this. We don’t need indentation styles for js, C/C++ is probably the only language that has that many established indentation styles. What would be a good name for the option? This custom option will be used for both js-ts-mode and jsx-ts-mode. js-ts-indent-align-multi-assignment-p?
> 
> Back when js2-mode used its own indentation code, we called it js2-pretty-multiline-declarations, and it wasn't just a boolean (one possible symbol value too):
> 
> https://github.com/mooz/js2-mode/blob/master/js2-old-indent.el#L75C12-L115
> 
> I don't have a strong opinion on the name, but just in case we'll want to support a third way maybe don't call it with '-p' at the end.
> 
> Also, it might be good to have the variable affect js-mode as well (and so it wouldn't need -ts- in the name) - it's just an extra check around the (js--multi-line-declaration-indentation) call inside js--proper-indentation.
> 
> Are there other js-mode indentation vars that affect js-ts-mode?

Ok, so the original path in this repot only changes typescript/tsx-ts-mode, and js-mode doesn’t align multivar declarations. So I only added an option to typescript-ts-mode that allows user to choose from the two indent style. The non-indent style seems to be the mainstream style (for better or worse), so I left the non-indent style as the default.

The original path is applied to emacs-30 and the new custom option is added to master.

Yuan