Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
belav committed Apr 12, 2024
1 parent 6796872 commit 55e3188
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Src/CSharpier.Rider/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# csharpier-rider

<!-- Plugin description -->
This plugin makes use of the dotnet tool [CSharpier](https://github.com/belav/csharpier) to format your code. CSharpier an opinionated code formatter for c#.
It uses Roslyn to parse your code and re-prints it using its own rules.

This plugin makes use of the dotnet tool [CSharpier](https://github.com/belav/csharpier) to format your code. CSharpier 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](https://prettier.io/) but has evolved over time.

## CSharpier Version

The plugin determines which version of csharpier is needed to format a give file by looking for a dotnet manifest file. If one is not found it looks for a globally installed version of CSharpier.

### To format files:

- Install csharpier
- as a local tool versioned to your project with `dotnet tool install csharpier`
- globally with `dotnet tool install -g csharpier`
- Use the `Reformat with CSharpier` action.
- Available when right clicking on a file in the editor
- Available via "Search Everywhere"
- Does not have a default keyboard shortcut but can be assigned one.
- Optionally configure CSharpier to `Run on Save` under Preferences/Settings | Tools | CSharpier

Please report any [issues](https://github.com/belav/csharpier/issues)

## Installation

- Using IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "CSharpier"</kbd> >
<kbd>Install Plugin</kbd>

---

## Troubleshooting
Expand All @@ -32,13 +39,14 @@ See [Editor Troubleshooting](https://csharpier.com/docs/EditorsTroubleshooting)
**Note** This plugin does not do any formatting and is versioned separately from CSharpier.

### Viewing CSharpier Logs

- Use the action "Show Log in Explorer"
- Look for entries for "CSharpierLogger"

### Enable Debug Logging for CSharpier

- Use the action "Debug Log Settings"
- Add entry for "#com.intellij.csharpier.CSharpierLogger"
- Restart Rider

<!-- Plugin description end -->

0 comments on commit 55e3188

Please sign in to comment.