WindowsmacOSLinux

Where Do EditorConfig Files Live?

EditorConfig lives in .editorconfig files from the edited file upward, stopping at root=true or the filesystem root.

Last updated

EditorConfig has no daemon and no registry: plugins find .editorconfig (always lowercase) in the opened file's directory, then each parent, until root=true or the filesystem root. Every match contributes its sections.

The file is INI with glob sections ([*.py], [{package.json,.travis.yml}]) and a small fixed property set (indent, endings, charset, final newline). Keep one at the repo root so checkouts behave identically everywhere.

Where EditorConfig stores this, by platform

Windows
[RepoDir]\.editorconfig

Style rules per glob section. Search stops at root=true. Editors need a plugin or built-in core; the file alone does nothing without one.

macOS
[RepoDir]/.editorconfig

Same mechanism on all systems. Note the Explorer quirk: name the file .editorconfig. (trailing dot) to create it, which Explorer trims to the right name.

Linux
[RepoDir]/.editorconfig

Same layout. Formatters like shfmt, StyLua and Prettier read these files too, so one .editorconfig can steer several tools at once.

Frequently asked questions

Parent folder settings leak into my project. How do I stop it?

Add root = true in the preamble of the topmost .editorconfig. Without it, editors keep climbing into parent and home directories and inherit outside settings silently.

Two .editorconfig files match. Which one wins?

Closer files win: properties apply in read order, so the nearest matching section overrides ancestors. Shared defaults go high, exceptions go low.

Notice an outdated path? Let us know.