Skip to content

v0.0.2

Choose a tag to compare

@rcrxy rcrxy released this 04 Sep 09:39
· 5 commits to main since this release
d6460b8

C# Workbench v0.0.2

This release introduces the first complete formatting workflow for C# and Razor development.

Added

  • Added C# Format Document and Format Selection support.
  • Added Razor / CSHTML document formatting.
  • Added shared EditorConfig parsing and formatting configuration resolution.
  • Added bundled default EditorConfig profile with VS Code editor-state fallback.
  • Added support for common C# formatting rules:
    • indentation
    • braces and new lines
    • spacing
    • single-line preservation
    • max_line_length
  • Added Razor / HTML formatting rules compatible with ReSharper / Rider html_* conventions.
  • Added HTML attribute spacing, layout and indentation support.
  • Added attribute wrapping based on max_line_length.
  • Added support for html_attribute_wrap and compatible ij_html_attribute_wrap values.
  • Attribute wrapping now accounts for indentation and visual tab width.
  • Existing multiline attributes can be collapsed back to a single line when they fit within the configured line length.
  • Razor @code and @functions blocks can reuse the C# formatter through CSharpCodeFormatter.

Improved

  • Improved protection of Razor expressions, comments, strings and whitespace-sensitive elements during formatting.
  • Improved handling of component attributes such as @onclick, @bind-* and @attributes.
  • Added formatting idempotency and additional formatter unit tests.

Scope

C# Workbench currently focuses on formatting-related EditorConfig rules only.

Code-style analyzers, naming rules, refactorings and code-quality preferences are intentionally outside the scope of the formatter.