From 9bb9bdd7cf88ed39bf0e0632e0add51afd9c233f Mon Sep 17 00:00:00 2001 From: javayhu Date: Thu, 20 Feb 2025 00:13:20 +0800 Subject: [PATCH] feat: add editor config --- .editorconfig | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ef1ca24 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,25 @@ +# EditorConfig helps maintain consistent coding styles across different editors and IDEs +# Visit https://editorconfig.org/ for more information +# Top-most EditorConfig file, no other .editorconfig files should be read in parent directories + +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md,*.mdx] +trim_trailing_whitespace = false + +[*.js,*.ts] +quote_type = single + +[{*.c,*.cc,*.h,*.hh,*.cpp,*.hpp,*.m,*.mm,*.mpp,*.js,*.java,*.go,*.rs,*.php,*.ng,*.jsx,*.ts,*.d,*.cs,*.swift}] +curly_bracket_next_line = false +spaces_around_operators = true +spaces_around_brackets = outside +indent_brace_style = K&R