[dia/neduard/add_editorconfig] !20 Add extra rules in editorconfig.



commit 0b18e36bdf86003c8cf7cf72cf66ce47c115367b
Author: Eduard Nicodei <eddnicodei gmail com>
Date:   Thu Jan 31 09:55:52 2019 +0000

    !20 Add extra rules in editorconfig.
    
      - root=true as per the documentation
      - indent_size = 2 only for c/cpp
      - max_line_length = 80 for sources
      - max_line_length = 60 for meson.build.

 .editorconfig | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/.editorconfig b/.editorconfig
index 9abed51e..c89c3e90 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,5 +1,22 @@
-[*.{c, h}]
+# EditorConfig is awesome:
+# https://EditorConfig.org
+root = true
+
+# Global rules (applies to all files).
+[*]
+end_of_line = lf
 indent_style = space
-indent_size = 2
 insert_final_newline = true
 trim_trailing_whitespace = true
+indent_size = 4
+
+[*.{py,c,h,cpp}]
+max_line_length = 80
+
+# Meson reads better with short lines.
+[meson.build]
+max_line_length = 60
+
+# Override rules for c/cpp.
+[*.{c,h,cpp}]
+indent_size = 2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]