GNU bug report logs -
#74386
Tree-sitter javascript indentation
Previous Next
Full log
View this message in rfc822 format
>>> I’ve already used it to rewrite c-ts-mode indent rules and it’s been a success; this baseline + override approach has been very helpful. c-ts-mode still has a lot of indent rules because of things like preproc directive, etc, but it’s much more manageable than before.
>>> I don’t know how much it would help modes that has simpler indent rules. Go-ts-mode and rust-ts-mode only has a handful of indent rules, maybe they don’t really need this baseline rule. OTOH Lua and Ruby has more involved indent rules, maybe they can benefit and reduce the number of rules they need to define.
>>
>> Ruby has different delimiters (do...end or def...end or etc), and the curlies don't do exactly the same job that they do in C. So I'm not sure how feasible it is. A half of the function would be a fit, though.
>
> Right, so I think it’ll still be more helpful than not.
>
> Yuan
I think I like what's suggested here - I'll see if I can make something
like this work in java-ts-mode, which has a standing bug just like the
one mentioned in this report.
Thanks!
Theo
This bug report was last modified 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.