Replies: 1 comment 2 replies
-
The end result of this is not dissimilar to the feature proposed in #839. They use different mechanisms to achieve this end, but it is ultimately about formatting configurability. One of the stated design goals of Topiary is:
That is, the philosophy is that the formatting rules should not be configurable but rather, if users have particular needs, they have the means to customise queries (which is relatively easy) to meet those needs. This raises the bar enough such that one doesn't end up with a proliferation of different styles -- i.e., over the space defined by configuration options -- which leads to bike-shedding about the "one true formatting style". That's not to say that we can't be persuaded otherwise. Configurability has come up twice now; we're open to discussion -- and thank you for starting this, here 🙏 -- but I think the argument to implement such a feature would need to be quite strong. |
Beta Was this translation helpful? Give feedback.
-
similar to configuring
rustfmt.toml
, topiary could have certain queries be mutually exclusive or toggleable throughlanguages.ncl
or atopiary.toml
.For the example below I'll use toml to mirror the way
rustfmt.toml
does configs:mutual exclusivity could be used for enum specifications such as rustfmt
brace_style
:The query file for
rust.scm
for supporting abrace_style
enum would look something like this:This would allow a
topiary.toml
to allow an end user to configure their styling in a similar way:Beta Was this translation helpful? Give feedback.
All reactions