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



commit 2c796f80ec9aa7adfa9e811283c53d7d3e5efaa6
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..db8e29cf 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
+
+# Define rules for individual file names.
+[*.{py,c,h,cpp}]
+max_line_length = 80
+
+# Meson reads better with short lines.
+[meson.build]
+max_line_length = 60
+
+[*.{c,h,cpp}]
+indent_size = 2


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