31 lines
995 B
Markdown
31 lines
995 B
Markdown
|
# Changed the default .NET formatter
|
||
|
|
||
|
When we first introduced the .NET formatter for C# files, we picked
|
||
|
[csharpier](https://csharpier.com/) because it was a lot faster than
|
||
|
[dotnet format](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format).
|
||
|
Since then, the opinionated formatting that came with `csharpier` was getting in
|
||
|
the way of our style and along with conflcits with
|
||
|
[ReSharper](https://www.jetbrains.com/resharper/).
|
||
|
|
||
|
The latest is breaking change that switches the default formatter out but
|
||
|
retains the `csharpier` formatting for those who want it. To put it back:
|
||
|
|
||
|
```nix
|
||
|
config = inputs.mfgames-project-setup.lib.mkConfig {
|
||
|
inherit system pkgs;
|
||
|
dotnet.enable = true;
|
||
|
dotnet.csharpier = true;
|
||
|
dotnet.format = false; # Defaults to false, so don't need it.
|
||
|
};
|
||
|
```
|
||
|
|
||
|
To use `dotnet format`, the setup would be:
|
||
|
|
||
|
```nix
|
||
|
config = inputs.mfgames-project-setup.lib.mkConfig {
|
||
|
inherit system pkgs;
|
||
|
dotnet.enable = true;
|
||
|
dotnet.format = true;
|
||
|
};
|
||
|
```
|