HN2new | past | comments | ask | show | jobs | submit | ErinvanderVeen's commentslogin

Hej!

I agree with you in that there are many languages where skipping parsing altogether could still result in a good formatter, and I would love to see a Topiary-like project attempt it.

I don't feel confident in saying that that holds for most languages however, worrying that it can lead to a lot of ambiguity in languages with more complex formatting conventions.

Regardless, the eventual goal of Topiary is to be able to format the widest possible spectrum of languages, and so limiting ourselves to just lexing didn't seem like the right choice at the time.

Like you mention, this does mean we give up being able to format broken code. In fact, we currently even ensure that TS is able to parse the entire input before formatting. This is a shame, but ultimately what we decided was the best approach for Topiary to achieve its goal.


Hi!

We are not sure right now because Topiary is still very much an experiment.

Having said that, we are constantly surprised what we can do with Topiary. So with a dedicated Python developer willing to draft a set of rules, it might just be possible!


Hi!

We share the same curiosity for the effectiveness of our approach! Right now, we want to make Topiary great for languages with less complex formatting rules, and "good enough" for languages that are a bit more complex. Where, on a one-off basis, you don't feel the need to get the dedicated formatter.

We don't yet have any ambitions to compete directly with Prettier and rustfmt among others.

Having said that, we are quite proud of how the OCaml rules turned out, and even had some great results with the Rust rules.

As we explore more, and expand the complexity of our tree-sitter scopes, who knows what kind of things we might be able to format!

It's all very exciting!


Hi! I work a bit on iTasks and there are several examples where iTasks was used in a live environment. I can urge you to take a look at https://top-software.nl/en/index.htm a company formed around iTasks and lead by Rinus Plasmeijer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: