Skip to content

Commit a51e7dd

Browse files
committed
chore: Update .editorconfig
1 parent 0eef34a commit a51e7dd

File tree

1 file changed

+71
-61
lines changed

1 file changed

+71
-61
lines changed

.editorconfig

Lines changed: 71 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,131 +21,141 @@ ij_formatter_tags_enabled = true
2121
ij_formatter_on_tag = @formatter:on
2222
ij_formatter_off_tag = @formatter:off
2323

24-
[{*.kt, *.kts}]
25-
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
26-
ij_continuation_indent_size = 4 # To match ktlint settings
27-
ij_kotlin_keep_indents_on_empty_lines = false
24+
[{*.kt,*.kts}]
25+
# Tabs and Indents
26+
# continuation_indent_size = 4 to match ktlint settings
27+
ij_kotlin_continuation_indent_size = 4
28+
ij_kotlin_keep_indents_on_empty_lines = unset
2829

29-
## Wrapping and Braces
30-
# Keep when reformatting
30+
# Spaces
31+
## Before parentheses
32+
ij_kotlin_space_before_if_parentheses = true
33+
ij_kotlin_space_before_for_parentheses = true
34+
ij_kotlin_space_before_while_parentheses = true
35+
ij_kotlin_space_before_catch_parentheses = true
36+
ij_kotlin_space_before_when_parentheses = true
37+
## Around operators
38+
ij_kotlin_spaces_around_assignment_operators = true
39+
ij_kotlin_spaces_around_logical_operators = true
40+
ij_kotlin_spaces_around_equality_operators = true
41+
ij_kotlin_spaces_around_relational_operators = true
42+
ij_kotlin_spaces_around_additive_operators = true
43+
ij_kotlin_spaces_around_multiplicative_operators = true
44+
ij_kotlin_spaces_around_unary_operator = false
45+
ij_kotlin_spaces_around_range = false
46+
## Other
47+
ij_kotlin_space_before_comma = false
48+
ij_kotlin_space_after_comma = true
49+
ij_kotlin_space_before_type_colon = false
50+
ij_kotlin_space_after_type_colon = true
51+
ij_kotlin_space_before_extend_colon = true
52+
ij_kotlin_space_after_extend_colon = true
53+
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
54+
ij_kotlin_spaces_around_function_type_arrow = true
55+
ij_kotlin_spaces_around_when_arrow = true
56+
ij_kotlin_space_before_lambda_arrow = true
57+
58+
# Wrapping and Braces
59+
## Keep when reformatting
3160
ij_kotlin_keep_line_breaks = true
3261
ij_kotlin_keep_first_column_comment = true
33-
# Extends/implements list
62+
## Extends/implements list
3463
ij_kotlin_extends_list_wrap = normal
3564
ij_kotlin_align_multiline_extends_list = false
3665
ij_kotlin_continuation_indent_in_supertype_lists = false
37-
# Function declaration parameters
66+
## Function declaration parameters
3867
ij_kotlin_method_parameters_wrap = on_every_item
3968
ij_kotlin_align_multiline_parameters = true
4069
ij_kotlin_method_parameters_new_line_after_left_paren = true
4170
ij_kotlin_method_parameters_right_paren_on_new_line = true
4271
ij_kotlin_continuation_indent_in_parameter_lists = false
43-
# Function call arguments
72+
## Function call arguments
4473
ij_kotlin_call_parameters_wrap = on_every_item
4574
ij_kotlin_align_multiline_parameters_in_calls = false
4675
ij_kotlin_call_parameters_new_line_after_left_paren = true
4776
ij_kotlin_call_parameters_right_paren_on_new_line = true
4877
ij_kotlin_continuation_indent_in_argument_lists = false
49-
# Function parentheses
78+
## Function parentheses
5079
ij_kotlin_align_multiline_method_parentheses = false
51-
# Chained function calls
80+
## Chained function calls
5281
ij_kotlin_method_call_chain_wrap = normal
5382
ij_kotlin_wrap_first_method_in_call_chain = false
5483
ij_kotlin_continuation_indent_for_chained_calls = false
55-
# 'if()' statement
84+
## 'if()' statement
5685
ij_kotlin_else_on_new_line = false
5786
ij_kotlin_if_rparen_on_new_line = true
5887
ij_kotlin_continuation_indent_in_if_conditions = false
59-
# 'do ... while()' statement
88+
## 'do ... while()' statement
6089
ij_kotlin_while_on_new_line = false
61-
# 'try' statement
90+
## 'try' statement
6291
ij_kotlin_catch_on_new_line = false
6392
ij_kotlin_finally_on_new_line = false
64-
# Binary expressions
93+
## Binary expressions
6594
ij_kotlin_align_multiline_binary_operation = false
66-
# Wraps
95+
## Wraps
6796
ij_kotlin_assignment_wrap = normal
6897
ij_kotlin_enum_constants_wrap = off
6998
ij_kotlin_class_annotation_wrap = split_into_lines
7099
ij_kotlin_method_annotation_wrap = split_into_lines
71100
ij_kotlin_field_annotation_wrap = split_into_lines
72101
ij_kotlin_parameter_annotation_wrap = off
73102
ij_kotlin_variable_annotation_wrap = off
74-
# 'when' statements
103+
## 'when' statements
75104
ij_kotlin_align_in_columns_case_branch = false
76-
# Braces placement
105+
ij_kotlin_line_break_after_multiline_when_entry = true
106+
ij_kotlin_indent_before_arrow_on_new_line = true
107+
## Braces placement
77108
ij_kotlin_lbrace_on_next_line = false
78-
# Expression body functions
109+
## Expression body functions
79110
ij_kotlin_wrap_expression_body_functions = 1
80111
ij_kotlin_continuation_indent_for_expression_bodies = false
81-
# Elvis expressions
112+
## Elvis expressions
82113
ij_kotlin_wrap_elvis_expressions = 1
83114
ij_kotlin_continuation_indent_in_elvis = false
84115

85-
## Spaces
86-
# Before Parentheses
87-
ij_kotlin_space_before_if_parentheses = true
88-
ij_kotlin_space_before_for_parentheses = true
89-
ij_kotlin_space_before_while_parentheses = true
90-
ij_kotlin_space_before_catch_parentheses = true
91-
ij_kotlin_space_before_when_parentheses = true
92-
# Around Operators
93-
ij_kotlin_spaces_around_assignment_operators = true
94-
ij_kotlin_spaces_around_logical_operators = true
95-
ij_kotlin_spaces_around_equality_operators = true
96-
ij_kotlin_spaces_around_relational_operators = true
97-
ij_kotlin_spaces_around_additive_operators = true
98-
ij_kotlin_spaces_around_multiplicative_operators = true
99-
ij_kotlin_spaces_around_unary_operator = false
100-
ij_kotlin_spaces_around_range = false
101-
# Other
102-
ij_kotlin_space_before_comma = false
103-
ij_kotlin_space_after_comma = true
104-
ij_kotlin_space_before_type_colon = false
105-
ij_kotlin_space_after_type_colon = true
106-
ij_kotlin_space_after_extend_colon = true
107-
ij_kotlin_space_before_extend_colon = true
108-
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
109-
ij_kotlin_spaces_around_function_type_arrow = true
110-
ij_kotlin_spaces_around_when_arrow = true
111-
ij_kotlin_space_before_lambda_arrow = true
112-
113-
## Blank Lines
114-
# Keep Maximum Blank Lines
116+
# Blank Lines
117+
## Keep maximum blank lines
115118
ij_kotlin_keep_blank_lines_in_declarations = 1
116119
ij_kotlin_keep_blank_lines_in_code = 1
117120
ij_kotlin_keep_blank_lines_before_right_brace = 0
118-
# Minimum Blank Lines
121+
## Minimum blank lines
119122
ij_kotlin_blank_lines_after_class_header = 0
120123
ij_kotlin_blank_lines_around_block_when_branches = 1
121124
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
122125

123-
## Imports
126+
# Imports
124127
ij_kotlin_name_count_to_use_star_import = 5
125128
ij_kotlin_name_count_to_use_star_import_for_members = 3
126129
ij_kotlin_import_nested_classes = false
127-
ij_kotlin_packages_to_use_import_on_demand = java.util.*, kotlinx.android.synthetic.**, io.ktor.**
128-
ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^
130+
ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**,io.ktor.**
131+
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
129132

130-
## Other
133+
# Other
134+
## Trailing comma
131135
ij_kotlin_allow_trailing_comma = true
132-
ij_kotlin_allow_trailing_comma_on_call_site = true
136+
ij_kotlin_allow_trailing_comma_on_call_site = false
133137

134-
## Code generation
138+
# Code generation
139+
## Comment code
135140
ij_kotlin_line_comment_at_first_column = true
136141
ij_kotlin_line_comment_add_space = false
142+
ij_kotlin_line_comment_add_space_on_reformat = false
137143
ij_kotlin_block_comment_at_first_column = true
144+
ij_kotlin_block_comment_add_space = false
145+
146+
# Load/Save
147+
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
138148

139149
[*.md]
140150
trim_trailing_whitespace = false
141151

142-
[{*.yaml, *.yml}]
152+
[{*.yaml,*.yml}]
143153
indent_size = 2
144-
ij_yaml_spaces_within_brackets = false
145-
ij_yaml_keep_indents_on_empty_lines = false
154+
ij_yaml_keep_indents_on_empty_lines = unset
146155
ij_yaml_keep_line_breaks = true
156+
ij_yaml_spaces_within_brackets = false
147157

148-
[{*.bash, *.sh, *.zsh}]
158+
[{*.bash,*.sh,*.zsh}]
149159
indent_size = 2
150160
tab_width = 2
151161

0 commit comments

Comments
 (0)