Misc: Add .editorconfig file for editor autosetup
Change-Id: Id0406b93264786cbca4de56a23e57999e258f05b
Signed-off-by: Anton Komlev <anton.komlev@arm.com>
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..86edf22
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# References:
+#
+# EditorConfig rules https://editorconfig.org/
+# TF-M coding rules https://tf-m-user-guide.trustedfirmware.org/contributing/coding_guide.html
+
+root = true
+
+################################
+# Default settings for all files
+[*]
+charset = uft-8
+end_of_line = lf
+indent_size = 4
+tab_width = 4
+indent_style = space
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+################################
+# Assembler
+[*.{S,s}]
+indent_size = 8
+tab_width = 8
+
+# The file categories below are left empty intentionally
+# for potential customisation in future
+
+################################
+# C and C++
+[*.{c,h,cpp,hpp}]
+
+################################
+# Python code
+[*.py]
+
+################################
+#CMake specific settings
+[{CMakeLists.txt,*.cmake}]
+
+################################
+#Documentation
+[*.{rst,md}]
+
+################################
+# json,yaml and xml files
+[{*.json,*.yaml,*.xml}]