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

C# Formatter Adding Spaces After Float Declarations #258

Open
hjc opened this issue Mar 29, 2020 · 0 comments
Open

C# Formatter Adding Spaces After Float Declarations #258

hjc opened this issue Mar 29, 2020 · 0 comments

Comments

@hjc
Copy link

hjc commented Mar 29, 2020

Hi, just installed the Unibeautify extension and while it does what I really want (wrap long lines), it's causing a bigger problem with floats. Here's an example snippet:

using System;

public class BeautifyExample {
    public BeautifyExample() {
        float four = 4f;
    }
}

Upon save it reformats this to:

using System;

public class BeautifyExample {
    public BeautifyExample() {
        float four = 4 f;
    }
}

I've disabled and re-enabled the Unibeautify extension and confirmed it was caused by this. My current config is:

{
  "C#": {
    "beautifiers": ["Pretty Diff"],
    "break_chained_methods": false,
    "indent_comments": true,
    "indent_size": 4,
    "indent_style": "space",
    "max_preserve_newlines": 1,
    "multiline_ternary": "never",
    "quotes": "double",
    "wrap_line_length": 80
  }
}

VS Code version is 1.11.2. OS is Windows.

Which was generated through the online config generator linked in the docs.

I'm also not sure how to work around this? It does it automatically on save, I don't see a comment for ignoring lines and I can't for the life of me find a setting that controls this. Any help would be appreciated! Thanks!

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

1 participant