|
| 1 | +# see http://editorconfig.org/ for docs on this file |
| 2 | + |
| 3 | +root = true |
| 4 | + |
| 5 | +[*] |
| 6 | +# help with sharing files across os's (i.e. network share or through local vm) |
| 7 | +end_of_line = lf |
| 8 | +#charset temporarily disabled due to bug in VS2017 changing to UTF-8 with BOM (https://favro.com/card/c564ede4ed3337f7b17986b6/Uni-17877) |
| 9 | +#charset = utf-8 |
| 10 | +trim_trailing_whitespace = true |
| 11 | +insert_final_newline = true |
| 12 | + |
| 13 | +# formattable file extensions (keep in sync with format.ini from unity-meta repo) |
| 14 | +# |
| 15 | +# Note: We need to split the formattable files configs into shorter duplicate entries (logically grouped) |
| 16 | +# due to known issue in VS editorconfig extension where there is a limit of 51 characters (empirically determined). |
| 17 | +# see: https://github.com/editorconfig/editorconfig-visualstudio/issues/21 |
| 18 | +# |
| 19 | +## uncrustify |
| 20 | +[*.{c,h,cpp,hpp,m,mm,cc,cs}] |
| 21 | +indent_style = space |
| 22 | +indent_size = 4 |
| 23 | + |
| 24 | +## generic formatter (shaders) |
| 25 | +[*.{cg,cginc,glslinc,hlsl,shader,y,ypp,yy}] |
| 26 | +indent_style = space |
| 27 | +indent_size = 4 |
| 28 | + |
| 29 | +## generic formatter (misc) |
| 30 | +[*.{asm,s,S,pch,pchmm,java,sh,uss}] |
| 31 | +indent_style = space |
| 32 | +indent_size = 4 |
| 33 | + |
| 34 | +## perltidy |
| 35 | +[*.{pl,pm,t,it}] |
| 36 | +indent_style = space |
| 37 | +indent_size = 4 |
| 38 | + |
| 39 | +## unity special |
| 40 | +[*.{bindings,mem.xml}] |
| 41 | +indent_style = space |
| 42 | +indent_size = 4 |
| 43 | + |
| 44 | +# other filetypes we want to overwrite default configuration to preserve the standard |
| 45 | +[{Makefile,makefile}] |
| 46 | +# TAB characters are part of the Makefile format |
| 47 | +indent_style = tab |
| 48 | + |
| 49 | +[*.{md,markdown}] |
| 50 | +# trailing whitespace is significant in markdown (bad choice, bad!) |
| 51 | +trim_trailing_whitespace = false |
| 52 | + |
| 53 | +# keep these and the VS stuff below in sync with .hgeol's CRLF extensions |
| 54 | +[*.{vcproj,bat,cmd,xaml,tt,t4,ttinclude}] |
| 55 | +end_of_line = crlf |
| 56 | + |
| 57 | +# this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited. |
| 58 | +# the settings are meant to closely match what VS does to minimize unnecessary diffs. this duplicates some settings in * |
| 59 | +# but let's be explicit here to be safe (in case someone wants to copy-paste this out to another .editorconfig). |
| 60 | +[*.{vcxproj,vcxproj.filters,csproj,props,targets}] |
| 61 | +indent_style = space |
| 62 | +indent_size = 2 |
| 63 | +end_of_line = crlf |
| 64 | +charset = utf-8-bom |
| 65 | +trim_trailing_whitespace = true |
| 66 | +insert_final_newline = false |
| 67 | +[*.{sln,sln.template}] |
| 68 | +indent_style = tab |
| 69 | +indent_size = 4 |
| 70 | +end_of_line = crlf |
| 71 | +charset = utf-8 |
| 72 | +trim_trailing_whitespace = true |
| 73 | +insert_final_newline = false |
0 commit comments