dazza5000
04/20/2022, 2:14 PMRob Elliot
04/20/2022, 2:47 PM.editorconfig
for me. With the below everything seems to Just Work:
root = true
[*]
insert_final_newline = true
max_line_length = 100
[*.{kt,kts}]
charset = utf-8
indent_style = space
indent_size = 2
# noinspection EditorConfigKeyCorrectness
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_java_class_count_to_use_import_on_demand = 999
ij_java_names_count_to_use_import_on_demand = 999
ij_java_packages_to_use_import_on_demand=unset
ij_kotlin_packages_to_use_import_on_demand=unset
dazza5000
04/20/2022, 2:49 PMRob Elliot
04/20/2022, 2:51 PMPaul Dingemans
04/20/2022, 2:52 PM.editorconfig
should be considered as the best way to go (at least from ktlint perspective). The IDEA can be configured to use .editorconfig
as well.dazza5000
04/20/2022, 3:12 PMdazza5000
04/20/2022, 3:13 PMPaul Dingemans
04/20/2022, 3:13 PMdazza5000
04/20/2022, 3:13 PM# Run command below from root directory of project
ktlint --android applyToIDEAProject
Paul Dingemans
04/20/2022, 3:14 PMnuhkoca
04/20/2022, 3:25 PMromtsn
04/21/2022, 3:50 PMromtsn
04/21/2022, 3:50 PMktlint generateEditorConfig