Subject: bug#60443: 29.0.60; c-ts-mode: Consider re-using c-file-style and c-basic-offset

From: Dmitry Gutov <[email-masked]>
Date: Sat, 31 Dec 2022 12:31:51 +0200

On 31/12/2022 06:02, Yuan Fu wrote:
> IIUC part of the reason why we created separate major modes is that we don’t want to share configuration variables between the tree-sitter and elisp implementation. If they share some of the configuration variable but not all, it would be very confusing; it they share all variables, well that’s not possible because c-ts-mode doesn’t support all of c-mode’s features.

js-ts-mode uses js-indent-level. css-ts-mode uses css-indent-offset. 
python-ts-mode and bash-ts-mode don't have their own indentation 
settings, so I suppose they reuse the "regular" indentation code.

There are a lot of other ts modes which don't have anything to reuse 
("regular" mode is not in Emacs).

FWIW, that's my plan for ruby-ts-mode: to share those options where it's 
feasible, to avoid random duplication, and to make comparing and 
switching easier. The test suite can be shared more easily too.

> Also, since c-ts-mode and c-mode’s implementation differs greatly, some of c-mode’s configuration wouldn’t make sense, or is hard to recreate, in c-ts-mode.

I suppose the CC styles might be trickier to implement exactly the same.