You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, formatting is handled by an external tool (Topiary). This is ok for the time being but requires a bit of logistics: users have to go to the Topiary repository, and follow the installation guide (or use cargo maybe, now that Topiary has been released). The version of Topiary and Nickel aren't necessarily in sync. It could be nice to have formatting built in the Nickel CLI.
Describe the solution you'd like
Instead of relying on Topiary, we could have a native sub-command to format Nickel code, such as nickel format. The plan is simply to embed Topiary inside the Nickel binary (behind a compilation flag, so that if one needs to embed a light interpreter only, they don't have to pay this cost).
Describe alternatives you've considered
do nothing, and keep using a separate tool with a separate update process
have our own internal formatter, without relying on Topiary. For some context, we tried to do that some time ago without duplicating too much the whole parser infrastructure - it turned out to be non trivial and cumbersome because LALRPOP is just not tailored to formatting (it loses to much source information), so we thought about re-using the tree-sitter grammar instead in some way...which led to the creation of Topiary! So, unless we change our parser infrastructure entirely, we've studied this issue and Topiary seems to be the best and simplest answer as of today
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, formatting is handled by an external tool (Topiary). This is ok for the time being but requires a bit of logistics: users have to go to the Topiary repository, and follow the installation guide (or use
cargo
maybe, now that Topiary has been released). The version of Topiary and Nickel aren't necessarily in sync. It could be nice to have formatting built in the Nickel CLI.Describe the solution you'd like
Instead of relying on Topiary, we could have a native sub-command to format Nickel code, such as
nickel format
. The plan is simply to embed Topiary inside the Nickel binary (behind a compilation flag, so that if one needs to embed a light interpreter only, they don't have to pay this cost).Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: