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

Support custom file extensions with IDE extensions #1274

Open
belav opened this issue May 31, 2024 · 3 comments
Open

Support custom file extensions with IDE extensions #1274

belav opened this issue May 31, 2024 · 3 comments

Comments

@belav
Copy link
Owner

belav commented May 31, 2024

#1251 is adding support for custom file extensions.

Right now all the IDE extensions are hardcoded to only try to format cs files.

Should we send all file edits to csharpier?

Should we make a configuration option for what file types to send to csharpier?

@NotAsea
Copy link

NotAsea commented Jun 1, 2024

highly upvote, i missed Csharpier when i work at .cshtml, and .razor file. dotnet format just suck ass, resharper-cli is too bloat and heavy and if you dont have rider license it's no go. Also you can only implement for razor file as f# already has their own well-working formatter

@belav
Copy link
Owner Author

belav commented Jun 1, 2024

To be clear, this issue will not be adding support for formatting razor files. This is just to support non-standard file extensions that someone wants formatted with the c# formatter.

@belav belav modified the milestones: 0.29.1, 0.29.2 Aug 23, 2024
@belav
Copy link
Owner Author

belav commented Aug 23, 2024

I believe for vscode it will just need to have a given extension associated with csharp, something like this. I just need to test then document it.

// settings.json
{
  "files.associations": {
    "*.csx": "csharp"
  }
}

When CSharpier supports formatting xml, then the vscode extension will have to register itself as an xml formatting provider.

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

No branches or pull requests

2 participants