On March 22, 2023 19:58:22 Yuan Fu <casouri@gmail.com> wrote:

On Mar 22, 2023, at 8:53 AM, Daniel Colascione <dancol@dancol.org> wrote:

Shouldn't customization of styles in c-ts-mode look more like cc-mode's
style machinery? Right now, the closest thing we have to defining a new
style is add-advice on c-ts-mode--indent-styles, which isn't
particularly convenient or future-proof. You can't drop a new style in,
say, .dir-locals.


Actually, you can define a custom function, say, c-ts-mode-my-style, and set c-ts-mode-indent-style to the name of it.

Yuan


But that doesn't add the new style to the UI selection menu and doesn't let you define a style in dir-locals. IMHO, cc-mode got this right.