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

From: Konstantin Kharlamov <[email-masked]>
Date: Sat, 19 Apr 2025 08:46:11 +0300

On Sat, 2025-04-19 at 04:02 +0300, Dmitry Gutov wrote:
> On 19/04/2025 02:43, Yuan Fu wrote:
> > Thanks! I personally like the current indentation,
> 
> js2-mode has been doing it this way for a number of years (triggered
> by 
> user requests), js-mode followed suit later.

That's unusual, do you have a link to the discussion? Such indentation
doesn't make sense to me (because when you have "const" and "var"
declarations near, they won't be aligned); and when I test it in VSCode
which I think most Web devs are using, it indents both to 3 spaces.

> 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.

1:
https://emacs.stackexchange.com/questions/77232/c-c-with-tree-sitter-how-to-change-indent