From 96700bbfc755e66434d46b941806e75094c1f687 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 13 May 2026 11:33:56 +0200 Subject: [PATCH] misc: init .editorconfig TL;DR: Improved developer productivity for many contributors Add a shared .editorconfig so contributors get lightweight, editor-native hints while writing code instead of only discovering formatting issues later in style checks. This is advisory, but useful: editors can already guide indentation, whitespace, line endings, and final newlines as you type. They can also show a visual guide at the 80-character line width, which is one of the main motivations here. Most LLM-generated code and contributions over the past year have already conventionally followed the 80-character limit, so this makes the expected style visible and consistent for everyone. .editorconfig is a decade-old standard, and virtually every editor or IDE supports it. Signed-off-by: Philipp Schuster --- .editorconfig | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..12f0b48b2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,25 @@ +# https://editorconfig.org/ +# +# Hints for editors to assist with correct formatting as you type. +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +indent_size = 4 +end_of_line = lf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true +# Recommendation, not enforced. +max_line_length = 80 + +[Makefile] +indent_style = tab + +# Inherited as default +# [*.sh] +# indent_size = 4 + +[{Cargo.lock,*.md,*.toml,*.yml,*.yaml}] +indent_size = 2