csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

```xaml``` support as xml files are now supposed to be formatted

Open JoKrus opened this issue 8 months ago • 4 comments

Hi,

I was wondering, if *.xaml files are also planned to be supported for formatting as they are also xml structured files that are currently not being formatted by csharpier.

Is there a reason for it missing?

JoKrus avatar May 09 '25 13:05 JoKrus

This was an oversight on my part because I'm not familiar with xaml. I see no reason why CSharpier can't format them.

I'll include them by default in the next minor release.

For now you can use the overrides to include xaml files - https://csharpier.com/docs/Configuration#configuration-overrides

belav avatar May 09 '25 15:05 belav

Thanks for the hint for the overrides. It worked nicely with the CLI but at least the Rider Plugin does not seem to accept this config entry. I have not tested the VS code or VS plugin.

Also a brief issue: In the documentation for json, it is shown as "files": ["*.cst"] but this seems to be wrong, I had to change it to "files": "*.cst" for it to be a valid config file

JoKrus avatar May 09 '25 15:05 JoKrus

Visual Studio does not show "Reformat with Csharpier" when you right click within a xaml file.

You have to run it via the cli.

I also experienced the same issue as JoKrus when configuring using a .csharpierrc

Tiptup300 avatar Jun 06 '25 15:06 Tiptup300

Also a brief issue: In the documentation for json, it is shown as "files": ["*.cst"] but this seems to be wrong, I had to change it to "files": "*.cst" for it to be a valid config file

Sorry about that! I updated the doc - files is a glob string pattern not an array.

belav avatar Jun 13 '25 15:06 belav