diff --git a/.editorconfig b/.editorconfig
index a8939e783f..7358e57474 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,6 +4,10 @@ end_of_line=lf
 insert_final_newline=true
 indent_style=space
 indent_size=4
+ij_any_block_comment_add_space = false
+ij_any_block_comment_at_first_column = false
+ij_any_line_comment_at_first_column = false
+ij_any_line_comment_add_space = true
 
 [*.tiny]
 indent_style=tab
@@ -16,3 +20,15 @@ indent_size=2
 
 [*.patch]
 trim_trailing_whitespace=false
+
+[*.java]
+ij_continuation_indent_size = 4
+ij_java_class_count_to_use_import_on_demand = 999999
+ij_java_insert_inner_class_imports = false
+ij_java_names_count_to_use_import_on_demand = 999999
+ij_java_imports_layout = *,|,$*
+ij_java_generate_final_locals = true
+ij_java_generate_final_parameters = true
+
+[test-plugin/**/*.java]
+ij_java_use_fq_class_names = false
diff --git a/.gitattributes b/.gitattributes
index 2fb638f44b..2ebd41bdf8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,4 @@
-* text=auto
+* text=auto eol=lf
 
 *.sh text eol=lf
 gradlew text eol=lf