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
for treefmt v1,
when this is called by the extension it ends up with an error due to duplicate --config argument:
Error running treefmt-nix: error: the argument '--config-file <CONFIG_FILE>' cannot be used multiple times Usage: treefmt [OPTIONS] [PATHS]... For more information, try '--help'.
for treevmt v2 it's not an error, and on first try treevmt v2 uses the last occurrence of --config-file, thus whatever happens to be in the repository.
proposal
add an extension setting that indicates skipping of config creation and omitting the --config <..> argument.
The text was updated successfully, but these errors were encountered:
Hi @steveej, can you please let me know what version of the extension you have installed?
Thanks!
I hope that the issue you're facing may have been addressed in the latest 2.1.0 release. The change below, you can see that it only adds the --config when the option is set in the vscode settings for the extension.
i just updated to v2.1.0. after removing the treefmt.toml and setting "treefmt.config": null explicitly i'm still seeing this notification when running treefmt in vscodium:
treefmt.toml not found. Would you like to create treefmt.toml?
IIUC this code always returns early if the config hasn't existed when the call happened.
issue
this would introduce compatibility with a wrapped treefmt binary that already encodes a
--config /nix/store/path
.e.g. using this as a formatter seems convenient to me:
the wrapper binary
treefmt
ends withfor treefmt v1,
when this is called by the extension it ends up with an error due to duplicate
--config
argument:for treevmt v2 it's not an error, and on first try treevmt v2 uses the last occurrence of
--config-file
, thus whatever happens to be in the repository.proposal
add an extension setting that indicates skipping of config creation and omitting the
--config <..>
argument.The text was updated successfully, but these errors were encountered: