In Android Studio (Artic Fox / Canary) there is a ...
# compose-desktop
y
In Android Studio (Artic Fox / Canary) there is a 'Preferences/Editor/Color Scheme/Compose' section (which simply allow to specify the look and feel of
@Composable
calls). I am not seeing it in IntelliJ Utlimate 2020.3.3. Is there a way to add such an entry?
j
Maybe it is added by the Compose IDEA plugin, which is not available in IDEA 2020.3
c
Yep, all the Compose tooling in Android Studio is only available in Android Studio canaries. Once it graduates to stable, you should see it in the Android plugin in IntelliJ about a quarter or two after the Google release.
j
Why Compose plugin is going to be merged into Android Studio? It should be a standalone plugin which can be used in Compose Desktop too, I thought Preview was going to work there.
c
Well there’s the Compose Desktop (CD) plugin which I believe is bundled in IntelIiJ today (someone from JetBrains can correct me if I’m wrong) and is specifically for getting you setup with CD, and is produced and maintained by JetBrains. The Android plugin is created and maintained by Google which is bundled in Android Studio and is always the most up-to-date in that IDE, which includes features like Preview and other tooling that you see in Android Studio (Layout Inspector support, Compose editor features like above, Compose project templates, etc). The Android plugin bundled in IntelliJ is the same one but is usually a version behind, and is maintained by JetBrains.
Additionally, the Android plugin bundled in IntelliJ only includes what is in stable versions of Android Studio. This is important when looking forward for Compose tooling you see in Android Studio to show up in IntelliJ via the Android plugin. Compose tooling is still only in canary versions of Android Studio, so until it’s graduated to stable versions, one should not expect to see it in the bundled Android plugin in IntelliJ.
Of course, there could be a future where tooling for Compose Android/Desktop/etc could converge where developers can expect similar feature sets in both IntelliJ and Android Studio, but I can’t comment on plans there.
j
Thank you for your responses :)
y
Thank you for the long answers. My question was more about if there was a way to simply tell IntelliJ to apply a different kind of color/font to functions annotated with
@Composable
. As I do not know how IntelliJ works under the cover, I do not know whether it is possible by adding a rule somewhere or it needs to be done via plugin, etc...
c
I don’t think there is. Looking at our source code, it looks like it has to be done through plugin extensibility points: https://cs.android.com/android-studio/platform/tools/adt/idea/+/mirror-goog-studio-m[…]gin/src/com/android/tools/compose/ComposeColorSettingsPage.kt
You could always copy/paste the code there into your own plugin for now?
Or maybe someone from JetBrains that has deeper knowledge of the IntelliJ Platform might have an idea…