AvaloniaVSCode icon indicating copy to clipboard operation
AvaloniaVSCode copied to clipboard

builtin axaml formatter

Open heartacker opened this issue 2 years ago • 9 comments
trafficstars

maybe we can reuse the xstyler

https://github.com/Xavalon/XamlStyler/wiki/Script-Integration

heartacker avatar Sep 10 '23 13:09 heartacker

Why wouldn't you just use XamlStyler? It does support Avalonia XAML.

maxkatz6 avatar Sep 10 '23 20:09 maxkatz6

Why wouldn't you just use XamlStyler? It does support Avalonia XAML.

xaml styler just is a cli tool ,we want a built-in solution

heartacker avatar Sep 11 '23 01:09 heartacker

It would definitely be nice to use the built-in VS Code formatting command to have axaml files formatted, as opposed to using a separate cli tool.

fuzzzerd avatar Sep 15 '23 16:09 fuzzzerd

@heartacker @fuzzzerd you might be interested in these topics https://github.com/Xavalon/XamlStyler/issues/349 https://github.com/Xavalon/XamlStyler/wiki/VSCode

maxkatz6 avatar Sep 16 '23 02:09 maxkatz6

@heartacker @fuzzzerd you might be interested in these topics https://github.com/Xavalon/XamlStyler/issues/349 https://github.com/Xavalon/XamlStyler/wiki/VSCode

geart,

  • and it connot work in linux,
  • we prefer a built-in tool

heartacker avatar Sep 16 '23 03:09 heartacker

@heartacker Avalonia doesn't own XamlStyled, and there are a few reasons to include it in this extension when it should be a dedicated XamlStyler extension. On the other hand, we could implement our own solution and include it with this extension, but I doubt it is worth spending time on that, when XamlStyler exists and does its job well.

maxkatz6 avatar Sep 16 '23 04:09 maxkatz6

@heartacker @fuzzzerd you might be interested in these topics Xavalon/XamlStyler#349 https://github.com/Xavalon/XamlStyler/wiki/VSCode

Thanks, that appears to be a decent workaround.

If there are no plans to implement formatting natively (or integrate that utility) with this extension I certainly respect that decision. I think most people using a VSCode extension will expect built-in formatting support, and if an external utility is the recommended path it would be nice to have a docs update that specifically recommends this setup.

fuzzzerd avatar Sep 17 '23 17:09 fuzzzerd