summaryrefslogtreecommitdiff
path: root/.editorconfig
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2021-07-19 11:43:49 +0100
committerPhilip Withnall <pwithnall@endlessos.org>2021-10-28 14:47:53 +0100
commite4b3a88b0e395547f88e46ad5c30debddd696a13 (patch)
tree8ccfd92f95f2176dec9feda8f167b70ec57f4697 /.editorconfig
parent98e0789fea615be6b2baa648a891b607eb7016db (diff)
downloadglib-e4b3a88b0e395547f88e46ad5c30debddd696a13.tar.gz
docs: Add .editorconfig file
This should ensure that all editors which support https://editorconfig.org/ use 2-space indentation with spaces (not tabs) by default. This isn’t a full specification of the GLib coding style (see https://gitlab.gnome.org/GNOME/gtk/blob/HEAD/docs/CODING-STYLE.md for that), but is a correct subset of it. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Diffstat (limited to '.editorconfig')
-rw-r--r--.editorconfig17
1 files changed, 17 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..d433576e7
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,17 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+
+[*.[ch]]
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+# For the legacy tabs which still exist in the code:
+tab_width = 8
+
+[meson.build]
+indent_size = 2
+indent_style = space
+