diff --git a/.clang-format b/.clang-format index 2e5161504103..67b722d967c7 100644 --- a/.clang-format +++ b/.clang-format @@ -120,6 +120,7 @@ UseTab: Never Language: ObjC ColumnLimit: 120 AlignAfterOpenBracket: Align +IndentWidth: 2 ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: false diff --git a/.editorconfig b/.editorconfig index 74c90164422d..5b03a1a2fb51 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,14 +1,30 @@ root = true [*] +charset = utf-8 end_of_line = lf insert_final_newline = true # Python -[*.py] +[*.{py,pyi,py.in,pyi.in}] indent_style = space indent_size = 4 +# C/C++/CUDA +[*.{cpp,hpp,cxx,cc,c,h,cu,cuh}] +indent_style = space +indent_size = 2 + +# Objective-C +[*.{mm,m,M}] +indent_style = space +indent_size = 2 + +# Clang tools +[.clang-{format,tidy}] +indent_style = space +indent_size = 2 + # Make [Makefile] indent_style = tab