Skip to content

Instantly share code, notes, and snippets.

@jesperronn
Last active March 31, 2025 10:28
Show Gist options
  • Save jesperronn/e5415bbbdbc6028db09c4943c108da1d to your computer and use it in GitHub Desktop.
Save jesperronn/e5415bbbdbc6028db09c4943c108da1d to your computer and use it in GitHub Desktop.
.editorconfig improve IntelliJ defaults (google-java-code, properties in UTF-8, etc)
# EditorConfig is awesome: https://EditorConfig.org
# USAGE:
# curl -L --remote-name https://gist.github.com/jesperronn/e5415bbbdbc6028db09c4943c108da1d/raw/.editorconfig
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 125
trim_trailing_whitespace = true
ij_continuation_indent_size = 2
[*.java]
ij_java_class_count_to_use_import_on_demand = 999
ij_java_layout_static_imports_separately = true
ij_java_imports_layout = @*, |, $*, |, *
[{*.ats,*.cts,*.mts,*.ts,*.tsx}]
ij_html_space_inside_empty_tag = true
ij_typescript_force_semicolon_style = true
ij_typescript_keep_blank_lines_in_code = 1
ij_typescript_spaces_within_imports = true
ij_typescript_spaces_within_object_literal_braces = true
[{*.cjs,*.js,*.jsx}]
ij_html_space_inside_empty_tag = true
ij_javascript_force_semicolon_style = true
ij_javascript_keep_blank_lines_in_code = 1
ij_javascript_spaces_within_imports = true
ij_javascript_spaces_within_object_literal_braces = true
[{*.pom,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt}]
ij_xml_space_after_tag_name = false
ij_xml_space_inside_empty_tag = false
[.run/**/*.xml]
ij_xml_keep_whitespaces = false
ij_xml_space_inside_empty_tag = true
[{*.gant,*.groovy,*.gy,Jenkinsfile,*.jenkinsfile,*.Jenkinsfile,*.spec}]
indent_size = 4
[{*.properties,spring.handlers,spring.schemas}]
charset = utf-8
[{*.ps1,*.psd1,*.psm1}]
max_line_length = 115
[{*.py,*.pyw}]
max_line_length = 80
indent_size = 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment