JetBrains Rider layout · now in VS Code

Bring Rider's file layout to your C# code.

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.

Zero-config daily flow Real Rider .xml / .DotSettings support Roslyn-powered · diff-friendly Unity-aware
See it in action

From messy member order… to your team's layout.

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).

  GameManager.cs — C#
# Before — members in random orderfocus · save · rearrange
// 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; }
}
# After — reordered by the active Rider layoutregions · priorities · injected deps
Features

Everything your team argued about, settled once.

Real Rider layout files, semantic C# understanding, and an editing experience that stays out of your way.

Your Rider layout, adopted to your rules

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.

Zero-config daily flow

Select your layout file once; from then on every *.cs you focus is reordered automatically. No buttons to hunt for, no shortcuts to remember.

Roslyn-powered semantics

A .NET 8 + Roslyn engine classifies members by kind, access, modifiers, attributes and interface implementations — not by fragile text heuristics.

Semantic Unity matchers

[SerializeField], lifecycle methods (Update, OnEnable…), RPC methods and Unity-style namespaces are matched semantically and routed to their own regions.

Interface implementations detected

Implicit and explicit interface members — void IDisposable.Dispose() or plain public void Dispose() — are placed in INTERFACE IMPLEMENTATIONS, resolved across the whole project.

Dependency-injection aware

Fields assigned anywhere in an instance constructor (this._field = … or _field = …) automatically route into a DEPENDENCIES region at the top.

#region blocks, on your terms

Region names from the layout become #region/#endregion blocks. Toggle the whole feature or pick exactly which regions to emit — no lost selection.

Diff-friendly by design

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.

Format on save & bulk rearrange

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.

How it works

Built for real Rider layouts — not a new formatter syntax.

Every Rider construct is parsed into a neutral engine model before the algorithm runs. Unsupported matchers fail closed instead of corrupting your source.

VS Code
TypeScript extension
→
RiderLayout.Cli
long-lived JSON-lines IPC
→
RiderLayout.Core / .Rider
layout model · XML parsing
→
RiderLayout.CSharp
Roslyn parse + span rewrite
1

Install once

Install from the Marketplace. A StyleCop/Unity layout (ideen-layout.xml) is bundled, so it works out of the box.

2

Choose your layout

Ctrl+Shift+P → Rider Layout: Select Layout File → pick your .xml / .DotSettings. Stored globally, used everywhere.

3

Done

Open any *.cs file — it's reordered the moment it gains focus. Toggle auto-apply, regions, or format-on-save anytime.

The bundled layout

A working StyleCop · Unity class order, built in.

The bundled ideen-layout.xml organizes every class in this order — with explicit region priorities, so the result is deterministic across the whole type:

DEPENDENCIES CONSTANTS SERIALIZED FIELDS STATIC FIELDS FIELDS CTORS PUBLIC · INTERNAL · PROTECTED · PRIVATE EVENTS ENUMS & INTERFACES PUBLIC · INTERNAL · PROTECTED · PRIVATE PROPERTIES INDEXERS INTERFACE IMPLEMENTATIONS RPC / UNITY METHODS PUBLIC → INTERNAL → PROTECTED → PRIVATE METHODS NESTED TYPES

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.

Commands & settings

Everything you can drive from the command palette.

CommandWhat it does
Select Layout FilePick a Rider layout .xml / .DotSettings file
Reset to Default LayoutClear your custom path, back to the bundled default
Toggle Auto-ApplyOn/off automatic reorder when a *.cs gains focus
Toggle Format on SaveOn/off reorder before every save (default off)
Toggle Region BlocksMaster switch for #region emission, keeps your selection
Rearrange DocumentApply the layout to the current file now
Rearrange All C# FilesApply to every *.cs in the workspace, format + save
Add Ignored FolderSkip folders (e.g. Migrations) in bulk rearrange
Preview Active LayoutShow the active layout XML
Reload SettingsRe-read the layout and settings
SettingDefault
enabledtrue — master switch
autoApplyOnFocustrue — reorder on focus
autoDetecttrue — discover .DotSettings/.idea
formatOnSavefalse — apply on save
formatAfterRearrangetrue — Shift+Alt+F after apply
settingsPathnull — bundled layout
emitRegionstrue — region blocks master
regions27 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”.

Release highlights

Getting closer to Rider with every version.

Latest: v0.5.12 — HasInitializer matcher, CRLF-stable output and ignore-folder fixes.

v0.5.12

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.

v0.5.11

The rewriter no longer collapses a nested type's closing brace to column zero — rearranged nested classes keep their indentation, staying properly nested.

v0.5.10

New homepage at atishbazi.tech — docs, screenshots, and installation instructions in one place.

v0.5.9

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.

v0.5.8

Interface implementations kept out of PUBLIC METHODS — they live only in INTERFACE IMPLEMENTATIONS.

v0.5.7

Ignore folders in bulk rearrange (Migrations by default) · files the layout can't process are still formatted and saved.

v0.5.6

Rearrange the whole project in one go — one bulk change, ready to review and commit.

v0.5.4

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).

Stop rearranging. Start developing.

Install once, pick your layout, and let the files organize themselves. Built for teams that love Rider's order but live in VS Code.