<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk" -->

---
title: Building Max Line Length: Making EditorConfig Formatting...
description: A new Visual Studio extension called Max Line Length turns EditorConfig&#x27;s max_line_length setting into a visible editor ruler and an opt-in reflow pipeline for...
canonical: https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building Max Line Length: Making EditorConfig Formatting Visible in Visual Studio | daily.dev
og:description: A new Visual Studio extension called Max Line Length turns EditorConfig&#x27;s max_line_length setting into a visible editor ruler and an opt-in reflow pipeline for...
og:url: https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk
og:image: https://api.daily.dev/og/posts/UQFLXRkDK.png
og:image:alt: Building Max Line Length: Making EditorConfig Formatting Visible in Visual Studio
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Max Line Length: Making EditorConfig Formatting Visible in Visual Studio

**[Mads Kristensen](https://daily.dev/sources/madskristensen)** · 5 min read · 0 upvotes · 0 comments

## Summary

A new Visual Studio extension called Max Line Length turns EditorConfig's max_line_length setting into a visible editor ruler and an opt-in reflow pipeline for formatting and Code Cleanup. It resolves the effective EditorConfig value per document, draws a non-intrusive WPF adornment as a line ruler, and centralizes reflow logic in a DocumentReflowService that uses language-aware engines for C#, VB, Markdown, and comment-aware languages while avoiding changes to string literals, code, and protected structures. Code Cleanup integration is opt-in via a fixer exposed through ICodeCleanUpFixerProvider. The author also shares general lessons for building Visual Studio extensions, such as using effective configuration instead of parallel systems and designing safe async refresh paths.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.madskristensen.net/blog/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio>

## Questions this post answers

### How can I make Visual Studio show a ruler for EditorConfig's max_line_length setting?

Visual Studio does not natively draw a boundary for EditorConfig's max_line_length, but the Max Line Length extension adds this as a WPF editor adornment. It resolves the effective value per document including nested configuration files, removes the ruler when the value is missing, invalid, or unset, and updates live as configuration changes without blocking the UI thread.

_Developers aligning editors with team formatting rules can track tooling like this on daily.dev._

### How do you safely automate code reflow to a maximum line length without breaking source code?

Safe reflow requires excluding anything that could change meaning: string and character literals in C# and Visual Basic are left untouched, structured XML documentation and preformatted content are preserved, and @formatter:off/@formatter:on markers create explicit exclusion zones. Markdown engines separately protect headings, tables, code fences, and front matter from being treated as ordinary prose.

_Engineers building code formatting tools can find implementation patterns like this through daily.dev._

## Similar posts on daily.dev

- [These VS Code settings solved my code review headaches before they even started](https://daily.dev/posts/these-vs-code-settings-solved-my-code-review-headaches-before-they-even-started-ucldcjilm) · XDA Developers · 0 upvotes · 0 comments
- [ReSharper for Visual Studio Code, Cursor, and Compatible Editors Is Out](https://daily.dev/posts/resharper-for-visual-studio-code-cursor-and-compatible-editors-is-out-gsx5laxlq) · JetBrains · 0 upvotes · 0 comments
- [ReSharper Made VS Code a Real Option for My .NET Work - Chris Woody Woodruff](https://daily.dev/posts/resharper-made-vs-code-a-real-option-for-my-net-work---chris-woody-woodruff-rsegbbpps) · We Are .NET · 6 upvotes · 0 comments
- [I have been using VS Code for years and I wish I knew about these settings sooner](https://daily.dev/posts/i-have-been-using-vs-code-for-years-and-i-wish-i-knew-about-these-settings-sooner-cbqllmukm) · XDA Developers · 0 upvotes · 0 comments
- [The Ultimate .NET Workflow for Cursor, Antigravity, and AI-First Editors](https://daily.dev/posts/the-ultimate-net-workflow-for-cursor-antigravity-and-ai-first-editors-g6ngrxj38) · JetBrains .NET Blog · 18 upvotes · 3 comments

---

Tags: [#visual-studio](https://daily.dev/tags/visual-studio)

[View this post on daily.dev](https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building Max Line Length: Making EditorConfig Formatting Visible in Visual Studio","url":"https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk"},"datePublished":"2026-10-04T13:06:02.559Z","dateModified":"2026-10-04T13:14:22.319Z","description":"A new Visual Studio extension called Max Line Length turns EditorConfig's max_line_length setting into a visible editor ruler and an opt-in reflow pipeline for...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3343f86088f8b5002c4f83c47d42c634?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3343f86088f8b5002c4f83c47d42c634?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Mads Kristensen","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Mads Kristensen","logo":"https://media.daily.dev/image/upload/s--gtcmG3po--/f_auto,q_auto/v1791119055/logos/madskristensen?_a=BAMAMicg0","url":"https://daily.dev/sources/madskristensen"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"visual-studio","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Mads Kristensen","item":"https://daily.dev/sources/madskristensen"},{"@type":"ListItem","position":3,"name":"Building Max Line Length: Making EditorConfig Formatting Visible in Visual Studio"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-max-line-length-making-editorconfig-formatting-visible-in-visual-studio-uqflxrkdk#faq","mainEntity":[{"@type":"Question","name":"How can I make Visual Studio show a ruler for EditorConfig's max_line_length setting?","acceptedAnswer":{"@type":"Answer","text":"Visual Studio does not natively draw a boundary for EditorConfig's max_line_length, but the Max Line Length extension adds this as a WPF editor adornment. It resolves the effective value per document including nested configuration files, removes the ruler when the value is missing, invalid, or unset, and updates live as configuration changes without blocking the UI thread. Developers aligning editors with team formatting rules can track tooling like this on daily.dev."}},{"@type":"Question","name":"How do you safely automate code reflow to a maximum line length without breaking source code?","acceptedAnswer":{"@type":"Answer","text":"Safe reflow requires excluding anything that could change meaning: string and character literals in C# and Visual Basic are left untouched, structured XML documentation and preformatted content are preserved, and @formatter:off/@formatter:on markers create explicit exclusion zones. Markdown engines separately protect headings, tables, code fences, and front matter from being treated as ordinary prose. Engineers building code formatting tools can find implementation patterns like this through daily.dev."}}]}
```

