summaryrefslogtreecommitdiff
path: root/mnv/.editorconfig
diff options
context:
space:
mode:
Diffstat (limited to 'mnv/.editorconfig')
-rw-r--r--mnv/.editorconfig46
1 files changed, 46 insertions, 0 deletions
diff --git a/mnv/.editorconfig b/mnv/.editorconfig
new file mode 100644
index 0000000000..d76a7f4a6c
--- /dev/null
+++ b/mnv/.editorconfig
@@ -0,0 +1,46 @@
+# https://spec.editorconfig.org/#supported-pairs
+root = true
+
+[*]
+indent_style = tab
+tab_width = 8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.{c,h,proto}]
+indent_size = 4
+
+[*.{md,yml,sh,bat}]
+# This will become the default after we migrate the codebase
+indent_style = space
+indent_size = 2
+
+[*.md]
+# Markdown uses trailing whitespaces to do an hard line break
+# https://spec.commonmark.org/0.31.2/#hard-line-breaks
+trim_trailing_whitespace = false
+
+[*.mnv]
+indent_style = space
+indent_size = 2
+
+[runtime/pack/dist/opt/{comment,nohlsearch}/**.mnv]
+indent_style = space
+indent_size = 4
+
+[runtime/doc/**.txt]
+# It can mess up some documentation by trying to strip trailing whitespaces
+trim_trailing_whitespace = false
+
+[src/testdir/test*.mnv]
+# Some tests need trailing whitespaces, for example `set showbreak=>>\ `
+trim_trailing_whitespace = false
+
+#
+# Some custom files do not use tabs
+#
+[src/sign.c]
+indent_style = space
+
+[src/sound.c]
+indent_style = space