Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more options to CodeFormatterOptions #1172

Closed
Phault opened this issue Feb 11, 2024 · 1 comment
Closed

Add more options to CodeFormatterOptions #1172

Phault opened this issue Feb 11, 2024 · 1 comment
Milestone

Comments

@Phault
Copy link
Contributor

Phault commented Feb 11, 2024

I'm creating a wrapper plugin for integrating Csharpier with dprint, but I've hit a snag as the Csharpier.Core package only exposes CodeFormatterOptions, which currently only contains the setting for PrintWidth.

Would it be possible to get all the options exposed? I'm willing to create a PR to add this, although I'd prefer knowing the reasoning for the current split of CodeFormatterOptions and PrinterOptions first.

@belav
Copy link
Owner

belav commented Feb 11, 2024

If I recall correctly, I added CodeFormatterOptions when there was just the single option for width, and then missed adding tabs/indent size. PrinterOptions contains a lot of options that didn't make sense to expose in CSharpier.Core which I believe is why I split them originally.

I'm not in love the the names in PrinterOptions - I'm thinking that TabWidth changes to IndentSize on CodeFormatterOptions (to line up with the editorconfig name). And maybe UseTabs should be an enum called IndentStyle, but an enum for just two options could be overkill.

I have no problem exposing the options so go ahead with the PR.

Phault added a commit to Phault/csharpier that referenced this issue Feb 12, 2024
@belav belav added this to the 0.27.3 milestone Feb 14, 2024
@belav belav closed this as completed in d2cd509 Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants