From 8726d3dc4e81c09c18f58babba3da8f6f67642e0 Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Mon, 1 Jun 2020 14:41:21 +0300 Subject: [PATCH] KT-37950 Add `io.ktor` packages to 'Packages to use * import' list - Ktor code style [here](https://ktor.io/quickstart/code-style.html) suggests to use star imports for Ktor packages - Absence of it in the default code style for Kotlin results in some inconveniences during auto-import and autocompletion (see the issue) - Automatic * import should mitigate the issue, since the first autocompleted item from the proper package should import the whole package, and then no further auto-import would be required for the next completions - KT-37950 Fixed --- .../kotlin/idea/core/formatter/KotlinCodeStyleSettings.java | 1 + 1 file changed, 1 insertion(+) diff --git a/idea/formatter/src/org/jetbrains/kotlin/idea/core/formatter/KotlinCodeStyleSettings.java b/idea/formatter/src/org/jetbrains/kotlin/idea/core/formatter/KotlinCodeStyleSettings.java index b7bcf77bbe1..2cb079d50b6 100644 --- a/idea/formatter/src/org/jetbrains/kotlin/idea/core/formatter/KotlinCodeStyleSettings.java +++ b/idea/formatter/src/org/jetbrains/kotlin/idea/core/formatter/KotlinCodeStyleSettings.java @@ -80,6 +80,7 @@ public class KotlinCodeStyleSettings extends CustomCodeStyleSettings { if (!ApplicationManager.getApplication().isUnitTestMode()) { PACKAGES_TO_USE_STAR_IMPORTS.addEntry(new KotlinPackageEntry("java.util", false)); PACKAGES_TO_USE_STAR_IMPORTS.addEntry(new KotlinPackageEntry("kotlinx.android.synthetic", true)); + PACKAGES_TO_USE_STAR_IMPORTS.addEntry(new KotlinPackageEntry("io.ktor", true)); } // Many of test data actually depend on this order of imports,