Closed NovaVoidHowl closed 3 months ago
I have a PR with partly implemented csproj formatting and had the same idea because it made sense to allow someone to use that formatter for xml, props, etc. I'll work on getting the ability to specify formatters for other extensions it into the next release.
One possibility
formatters:
- type: csharp
extensions: [ ".cs", ".cs.custom" ]
- type: xml
extensions: [ ".xml", ".csproj" ]
Or maybe support it with .editorconfig
.
[*.{cs,cs.custom}]
csharpier_formatter = csharp
[*.xml]
csharpier_formatter = xml
I should also take a look at how prettier does this.
Request
As it currently stands, it is not possible to scan C# files that have custom extensions (for build/deployment processes etc.) The only work around for this, is to have a special script/process: that changes the extension, runs CSharpier, then puts the extension back.
Concept
Add a config section to the '.csharpierrc.*' that allows the user to pick the file extensions to target ie.