Closed tamasfe closed 1 year ago
So I do a rhai fmt
in a directory?
Yes, if you do just rhai fmt
, files included in the config (or current dir if no rhai config exists) will be formatted, alternatively you can do rhai fmt .
or rhai fmt "some/glob/**/*.rhai"
Added the following to the CLI:
config init
command that creates a new configuration fileconfig schema
print JSON schema for the config (will be useful for TOML ide completions)fmt (--check)
check formatting and/or format files in placeIt is now possible to mass-format files via the cli.
Custom operators are supported based on the definition files that can be found according to the
Rhai.toml
or default config, this means that at the beginning we build up a HIR. It might sound overkill just for formatting, but this way the user does not have to do anything extra to support custom operators.