Download this extension from the Visual Studio Marketplace or get the CI build.
Provides full language support for .editorconfig files in Visual Studio, including IntelliSense, validation, and formatting.
The EditorConfig Project helps developers define and maintain consistent coding styles between different editors and IDEs.
Visual Studio natively supports .editorconfig files, but it doesn't provide rich language support for editing those files. This extension fills that gap with IntelliSense, validation, formatting, and more.
Note: This extension requires Visual Studio 2022 (17.0) or newer.
See the change log for changes and road map.
Need help getting started? Check out Microsoft's EditorConfig documentation for details and examples of coding styles available.
- Makes it easy to create .editorconfig files
- Syntax highlighting
- C#, VB.NET, and C++ style analyzers
- Intellisense
- Code snippets
- Validation
- Hover tooltips
- Light bulbs
- Code formatting
- Navigational drop downs
- Inheritance visualizer
- Settings
- Brace completion
- Brace matching
- Comment/uncomment
- Outlining (code folding)
- Drag 'n drop file onto .editorconfig file
To make it really easy to add a .editorconfig file, you can now right-click any folder, project, solution folder and hit Add -> .editorconfig File
Full colorization of the full .editorconfig syntax.
Visual Studio lets you add C#, VB.NET, and C++ specific rules to the .editorconfig file. In addition to enabling various rules, a severity is also added to control how Visual Studio is going to handle these rules.
Each severity is clearly marked by an icon to make it easy to identify.
The extension provides full IntelliSense and validation for C++ EditorConfig properties, including indentation, formatting, and code style options.
The extension provides Intellisense for both keywords and values.
Various code snippets have been added to make it easier to work with .editorconfig files.
To insert a snippet, right-click inside the editor or hit Ctrl+K,Ctrl+X.
This will show a list of available snippets to insert.
Error squiggles are shown for invalid values.
Properties that are being overridden by a duplicate property in the same section is easy to identify.
If a parent document contains the exact same property and value in a section with the same globbing pattern, a suggestion shows up to remove it.
See the complete list of error codes.
To suppress any error in the .editorconfig document, use the light bulb feature:
That will add a special comment at the top of the file to let the validator know what error messages to suppress.
Another way to suppress the error is by right-clicking the error in the Error List.
Many third-party tools like ReSharper, Rider, and Roslynator add their own properties to .editorconfig files. By default, the extension ignores properties with these common prefixes to avoid false validation errors:
resharper_- JetBrains ReSharper/Rider propertiesidea_- JetBrains IntelliJ IDEA propertiesroslynator_- Roslynator analyzer propertiesij_- Alternative IntelliJ prefix
You can customize the ignored prefixes in Tools → Options → Text Editor → EditorConfig → Validation → Ignored property prefixes.
Hover the mouse over any keyword to see a full description.
Sorting properties, deleting sections, and adding missing rules is easy with the commands being shown as light bulbs in the editor margin.
Typing Ctrl+K,D will invoke Visual Studio's Format Document command. By default that will align all the equal (=) delimeters and add 1 space character around both equal- and colon characters. This behavior is configurable in the settings (see below).
Dropdown menus at the top of the editor makes it easy to navigate the document.
A project can have multiple .editorconfig files and the rules in each cascades from the top-most and down. It is based on folder structure.
The inheritance visualizer is located at the bottom right corner of the editor window and makes it easy to see this relationship.
You can navigate to the immediate parent document by hitting F12. You can change the shortcut under Tools -> Options -> Environment -> Keyboard and find the command called EditorConfig.NavigateToParent.
Note, the inheritance visualizer is only visible when the current file isn't the root of the hierarchy or by specifying the root = true property.
Change the behavior of the editor from Tools -> Options or simply by right-clicking in the editor.
Other Visual Studio extensions can contribute their own EditorConfig properties that will be recognized by IntelliSense and validation. This is useful for extensions that introduce custom analyzer rules or tool-specific settings.
Extensions that integrate with this feature include:
To register a custom schema, add the following to your extension's .pkgdef file:
[$RootKey$\Languages\Language Services\EditorConfig\Schemas\MyExtensionName]
"schema"="$PackageFolder$\my-editorconfig-schema.json"
"moniker"="KnownMonikers.Settings"
- The subkey name (
MyExtensionName) is used as the display name in the IntelliSense filter schema- Path to your JSON schema filemoniker- Icon for your properties in IntelliSense (see Moniker Format)
The schema JSON file should follow the same format as the built-in schema, with a "properties" array:
{
"properties": [
{
"name": "my_custom_property",
"description": "Description shown in tooltips and IntelliSense.",
"values": ["value1", "value2", "value3"],
"defaultValue": ["value1"],
"severity": false,
"documentationLink": "https://example.com/docs/my-property"
},
{
"name": "my_severity_property",
"description": "A property that supports severity suffixes.",
"values": [true, false],
"defaultValue": [true],
"severity": true,
"defaultSeverity": "warning"
}
]
}| Field | Type | Description |
|---|---|---|
name |
string | Required. The property name (e.g., my_tool_option). |
description |
string | Description shown in tooltips and IntelliSense. |
values |
array | List of valid values (strings, booleans, or numbers). |
defaultValue |
array | The default value(s) for the property. |
severity |
boolean | If true, the property supports severity suffixes (:error, :warning, etc.). |
defaultSeverity |
string | Default severity when severity is true. One of: none, silent, suggestion, warning, error. |
documentationLink |
string | URL to documentation for F1 help. |
multiple |
boolean | If true, the value can be a comma-separated list. |
hidden |
boolean | If true, the property won't appear in IntelliSense but will be recognized. |
unsupported |
boolean | If true, the property is marked as not supported by Visual Studio. |
example |
string | Code example showing the effect of this property. |
The moniker value in the pkgdef can be specified in two formats:
- KnownMonikers name:
KnownMonikers.Settings,KnownMonikers.JsonScript, etc.- See KnownMonikers for available icons
- GUID:ID format:
{guid}:{id}for custom image catalog entries- Example:
{ae27a6b0-e345-4288-96df-5eaf394ee369}:1234
- Example:
- Built-in properties always take precedence over custom properties with the same name.
- If multiple extensions register properties with the same name, the first one loaded wins.
- Severities cannot be added or modified by custom schemas; only the built-in severities are used.
To build this project locally:
- Clone the repository
- Open
EditorConfigLanguage.slnxin Visual Studio 2022 - Build and run (F5) to test in the Experimental Instance
References to available formatting/code options directly from Roslyn codebase:



















