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 csharpier support #329

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

gs-101
Copy link

@gs-101 gs-101 commented Oct 31, 2024

csharpier

CSharpier is an opinionated code formatter for c#. It uses Roslyn to parse your code and re-prints it using its own rules. The printing process was ported from prettier but has evolved over time.

I added it as an option, but decided to use clang-format as the default (since that's what the other C modes do). I can remove these commits if you disagree with this decision.

@gs-101
Copy link
Author

gs-101 commented Oct 31, 2024

@gs-101
Copy link
Author

gs-101 commented Oct 31, 2024

I'll be back tomorrow and try different fixes, sorry about these errors.

@raxod502
Copy link
Member

Huh. Weird software. Microsoft should just package their stuff like a normal distributor instead of having this custom thing.

If you don't, I'll eventually get around to troubleshooting this.

@gs-101
Copy link
Author

gs-101 commented Nov 12, 2024

Weird software. Microsoft should just package their stuff like a normal distributor [...]

🤣 I thought it just worked like a regular language-specific package manager like Cargo, didn't know it was that different.

If you don't, I'll eventually get around to troubleshooting this.

Thanks, hope it's not too much trouble for you, like, permission denied?? When it's already on $PATH? I'm on Nobara (Fedora derivatie) and it worked for me. Maybe there's an Ubuntu-specific issue, but now that I just checked I set up $PATH differently (it's how it comes with the distro and worked with Cargo and Homebrew):

    # dotnet support
    if ! [[ "$PATH" =~ $HOME/.dotnet/tools:$HOME/bin: ]]; then
        PATH="$HOME/.dotnet/tools:$HOME/bin:$PATH"
    fi
    export PATH

I'll check again on my machine and then push this path configuration to .bash.

EDIT: If we can't come up with a solution, we can just rebrand this PR to "Add C# support" and just use clang-format instead.

@gs-101
Copy link
Author

gs-101 commented Nov 12, 2024

Hm, no success. You can continue troubleshooting this, but if you change your mind I can rebase this PR like I mentioned in the previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants