The missing piece for C# developers who love Rider's member arrangement but work in VS Code. Point it at your Rider layout and your files organize themselves — no new formatter to learn, no config abuse.
Same file, same logic. Toggle between the raw class and the same class after the active Rider layout is applied (auto on focus, on save, or on demand).
// Before — members wherever they happen to be:
public class GameManager : MonoBehaviour, IDisposable
{
private int score;
public int Score { get; set; }
private readonly ILogger _logger;
[SerializeField] private GameObject playerPrefab;
public GameManager(ILogger logger)
{
_logger = logger;
}
private void Update() { }
public void Dispose() { }
private void OnEnable() { }
public void AddScore(int points) { score += points; }
}
Real Rider layout files, semantic C# understanding, and an editing experience that stays out of your way.
The exact layout you already use in Rider (.xml / .DotSettings, including Unity namespaces) loads directly. No migration, no rewriting — same pattern your team already relies on.
Select your layout file once; from then on every *.cs you focus is reordered automatically. No buttons to hunt for, no shortcuts to remember.
A .NET 8 + Roslyn engine classifies members by kind, access, modifiers, attributes and interface implementations — not by fragile text heuristics.
[SerializeField], lifecycle methods (Update, OnEnable…), RPC methods and Unity-style namespaces are matched semantically and routed to their own regions.
Implicit and explicit interface members — void IDisposable.Dispose() or plain public void Dispose() — are placed in INTERFACE IMPLEMENTATIONS, resolved across the whole project.
Fields assigned anywhere in an instance constructor (this._field = … or _field = …) automatically route into a DEPENDENCIES region at the top.
#region blocks, on your termsRegion names from the layout become #region/#endregion blocks. Toggle the whole feature or pick exactly which regions to emit — no lost selection.
A span-based rewriter touches only what belongs inside the class body. Usings, other types and surrounding code are untouched — clean diffs, intact using blocks.
Reapply the layout before every save, or rearrange all *.cs across the workspace in one bulk change — with folders like EF Migrations skipped by default.
Every Rider construct is parsed into a neutral engine model before the algorithm runs. Unsupported matchers fail closed instead of corrupting your source.
Install from the Marketplace. A StyleCop/Unity layout (ideen-layout.xml) is bundled, so it works out of the box.
Ctrl+Shift+P → Rider Layout: Select Layout File → pick your .xml / .DotSettings. Stored globally, used everywhere.
Open any *.cs file — it's reordered the moment it gains focus. Toggle auto-apply, regions, or format-on-save anytime.
The bundled ideen-layout.xml organizes every class in this order — with explicit region priorities, so the result is deterministic across the whole type:
Every region carries an explicit Priority; internal members are split out of the public blocks; properties, indexers and methods are tagged
Not ImplementsInterface so interface implementations only ever land in INTERFACE IMPLEMENTATIONS.
| Command | What it does |
|---|---|
| Select Layout File | Pick a Rider layout .xml / .DotSettings file |
| Reset to Default Layout | Clear your custom path, back to the bundled default |
| Toggle Auto-Apply | On/off automatic reorder when a *.cs gains focus |
| Toggle Format on Save | On/off reorder before every save (default off) |
| Toggle Region Blocks | Master switch for #region emission, keeps your selection |
| Rearrange Document | Apply the layout to the current file now |
| Rearrange All C# Files | Apply to every *.cs in the workspace, format + save |
| Add Ignored Folder | Skip folders (e.g. Migrations) in bulk rearrange |
| Preview Active Layout | Show the active layout XML |
| Reload Settings | Re-read the layout and settings |
| Setting | Default |
|---|---|
| enabled | true — master switch |
| autoApplyOnFocus | true — reorder on focus |
| autoDetect | true — discover .DotSettings/.idea |
| formatOnSave | false — apply on save |
| formatAfterRearrange | true — Shift+Alt+F after apply |
| settingsPath | null — bundled layout |
| emitRegions | true — region blocks master |
| regions | 27 regions, all enabled |
| ignoreFolders | ["Migrations"] |
| cliPath | "" — bundled .NET CLI |
There's also a code action: put the caret in a class body, hit the lightbulb, and choose “Apply Rider File Layout”.
Latest: v0.5.12 — HasInitializer matcher, CRLF-stable output and ignore-folder fixes.
New HasInitializer matcher (<HasInitializer/>) — layouts can tell fields with an initializer apart from ones assigned elsewhere · rearranged output is normalized to the document's own line endings, so CRLF files no longer open dirty · Add Ignored Folder keeps built-in defaults, matches folders case-insensitively, and handles nested \// paths.
The rewriter no longer collapses a nested type's closing brace to column zero — rearranged nested classes keep their indentation, staying properly nested.
New homepage at atishbazi.tech — docs, screenshots, and installation instructions in one place.
Explicit region Priority across the whole type · ctor-injected fields auto-route to DEPENDENCIES · internal events / properties / indexers / methods split out · interface implementations confined to their own region.
Interface implementations kept out of PUBLIC METHODS — they live only in INTERFACE IMPLEMENTATIONS.
Ignore folders in bulk rearrange (Migrations by default) · files the layout can't process are still formatted and saved.
Rearrange the whole project in one go — one bulk change, ready to review and commit.
No more false "Select Layout File" prompts — files with no class are a silent no-op · a pattern that doesn't apply leaves the file untouched (fail-closed).
Install once, pick your layout, and let the files organize themselves. Built for teams that love Rider's order but live in VS Code.