From f89d638de31166333db7669f2d1e63ce7074b924 Mon Sep 17 00:00:00 2001 From: CXM <16154023+littlecxm@users.noreply.github.com> Date: Sat, 26 Mar 2022 19:41:25 +0800 Subject: [PATCH] chore: edit code format config (#3578) --- .editorconfig | 8 +++++++- .vscode/extensions.json | 6 ++++++ .vscode/settings.json | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.editorconfig b/.editorconfig index 7d2cdb1002a2..76db732dc5e8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,10 +17,16 @@ indent_size = 4 trim_trailing_whitespace = false insert_final_newline = false +[*.json] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true + # C coding style based on Linux kernel. # https://www.kernel.org/doc/html/v5.0/process/coding-style.html -[*.sh] +[[{*.sh,*.inc}]] indent_style = tab indent_size = 4 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000000..099637beeb65 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "editorconfig.editorconfig", + "foxundermoon.shell-format" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000000..1af9cbb1300d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "[*.inc]": { + "editor.defaultFormatter": "foxundermoon.shell-format" + } +}