https://kotlinlang.org logo
Join Slack
Powered by
# intellij-plugins
  • t

    Timo Drick

    02/03/2025, 9:58 AM
    I do have an other issue. When IntelliJ is opened together with my plugin active (It is a fileEditorProvider -> TextEditorWithPreviewProvider). So a file is already opened from last session. My code is executed before the system is ready. I am not sure exactly what that means. But it is not indexing. It looks like that the project is not finished opening or s.th. like that. So my question is can i get the state of the IDE to be aware of if the project is currently opening?
    b
    • 2
    • 2
  • t

    Timo Drick

    02/17/2025, 9:25 AM
    I would like to use the Workspace Model instead of the Project Model in my plugin. But i still not able to get the output path where the classes are compiled for a module. I am using following Project Model code to get the classpath for a module:
    Copy code
    val rm = ModuleRootManager.getInstance(module)
    val classPath = rm
        .orderEntries()
        .classesRoots
        .map { it.presentableUrl }
    How could i get it in Workspace Model. I am already be able to get the path to all dependencies but i am missing the path to the classes generated by this module itself:
    Copy code
    module.dependencies
        .filterIsInstance<LibraryDependency>()
        .mapNotNull { currentSnapshot.resolve(it.library) }
        .mapNotNull { library ->
            library.roots.find {
                it.type == LibraryRootTypeId.COMPILED
            }?.url?.presentableUrl
        }
    My experiments with module.contentRoots and module.sourceRoots show that this do not contain the correct path just some intermediate folders where resources are generated.
  • d

    Draget

    02/18/2025, 7:10 PM
    There is this plugin to integrate a serial console into IDEA: https://plugins.jetbrains.com/plugin/8031-serial-port-monitor It is one of the several plugins that is published under the Jetbrains branding that does not publish any change-logs, which I had brought up two or three years ago, but whelp. What my actual issue is: This plugin is receiving multiple updates per month, per week and in the recent days even sometimes per day. And even worse: The associated git repository does not have any commits since over a month: https://github.com/JetBrains/intellij-plugins/tree/master/serial-monitor This does ring quiet a few security-related bells for me. Before I start bin-diffing and analyzing, does anyone know any possible explanation for this?
    b
    • 2
    • 13
  • b

    bod

    02/19/2025, 10:46 AM
    set the channel topic: Developing IntelliJ IDEA plugins? Feel free to ask any questions about migrating to K2 mode here. Also check out the JetBrains Platform forum: https://platform.jetbrains.com/
  • b

    bod

    02/27/2025, 8:47 AM
    you need to do something like here and pass a
    localPath
    for example that's what we do:
    Copy code
    tasks {
      val runLocalIde by intellijPlatformTesting.runIde.registering {
        // Use a custom IJ/AS installation. Set this property in your local ~/.gradle/gradle.properties file.
        // (for AS, it should be something like '/Applications/Android Studio.app/Contents')
        // See <https://plugins.jetbrains.com/docs/intellij/android-studio.html#configuring-the-plugin-gradle-build-script>
        providers.gradleProperty("apolloIntellijPlugin.ideDir").orNull?.let {
          localPath.set(file(it))
        }
    }
    k
    • 2
    • 13
  • w

    wwalkingg

    03/10/2025, 8:52 AM
    Sorry to bother you all, I would like to ask if IntelliJ Community will include the Compose runtime soon?
    • 1
    • 1
  • e

    Emre

    03/14/2025, 3:14 AM
    What metadata does IntelliJ Ultimate's Redocly OpenAPI generator recognize in Kotlin? Is there a way to provide examples, or to describe parameters?
  • m

    Michael Friend

    03/21/2025, 5:17 PM
    EDIT: Turns out i was using a 1.x version of the sdk since i created it from the wizard instead of the template which is probably the issue. migrating now which im guessing will fix it Im having issues getting a service created with a
    CoroutineScope
    . I added a coroutinescope constructor parameter to my service just like the docs say, but once i do that my call to `service()`/
    ApplicationManager.getApplication().getService
    give an error
    Cannot create class
    . I get the same error when trying to add
    Project
    in the constructor as mentioned in other parts of the docs. what am i doing wrong here?
    • 1
    • 3
  • y

    Youssef Shoaib [MOD]

    03/22/2025, 6:47 AM
    How do I declare that my
    FoldingDescriptor
    depends on Analysis API results? Do I have to try and get the PSI out of the references I grab? I'm guessing
    reference.psi
    would be sufficient?
  • y

    Youssef Shoaib [MOD]

    03/22/2025, 8:51 AM
    Is there a way for me to invalidate all my custom
    FoldingDescriptors
    in a file upon the file changes? Adding a dependency on
    currentFile
    does not seem to work
    • 1
    • 1
  • m

    Michael Friend

    03/24/2025, 3:45 PM
    Has anyone run into issues trying to use Ktor in a plugin project? I have a project thats basically just the github template but i added a coroutine scope to
    MyProjectService
    which works, but when i add any ktor dependencies it fails to resolve the service at run time with this error even though my service has a
    Project, CoroutineScope
    constructor. Here's a repo to reproduce the issue https://github.com/mrf7/ide-plugin
    Copy code
    Caused by: com.intellij.platform.instanceContainer.instantiation.InstantiationException: Class 'class com.github.mrf7.ideplugin.services.MyProjectService' does not define any of supported signatures '[(Project)void, (Project,CoroutineScope)void, (CoroutineScope)void, ()void]'
    b
    • 2
    • 5
  • y

    Youssef Shoaib [MOD]

    03/30/2025, 1:37 AM
    Is there any way I can set a custom colour for a programmatically-created folding region? In particular, my folding regions span just an identifier, so I'd like to colour them in the same way that the underlying identifier would be coloured. Is that possible at all?
  • s

    Subash K

    04/12/2025, 7:33 AM
    Hi everyone! I’m working on a custom IntelliJ plugin UI and I noticed that
    com.intellij.toolwindow.StripeButtonUI
    is used internally for rendering tool window buttons. I understand it's not part of the public API, but I was wondering: Is it safe (or acceptable) to indirectly rely on
    StripeButtonUI
    for visual consistency, without explicitly referencing it in code?
    For example, mimicking its styles or letting the platform render components that use it under the hood. I want to make sure my plugin stays compatible and follows best practices. Appreciate any insights or recommendations on handling this kind of UI consistency without crossing into unsupported/internal API territory. 🙏
  • l

    Leo Podmolik

    04/15/2025, 5:09 PM
    Hi all, I am trying write some plugin by LivePlugin in ma Android project ... but looks like something i am missing because I haven't highlited code or suggestion for imports in plugin.kts ... even when I try it in AndroidStudio or IntelliJ IDEA ... does anybody similar problem ?
  • m

    Michael Friend

    04/24/2025, 6:33 PM
    Does anyone have a working example of persisting state/settings in a plugin? I followed the docs and even just copy pasted the example into my project and i still get this warning that the state cant be serialized and the values arent persisted across reset
    WARN - #c.i.u.x.Binding - No accessors for intellijplugin.toolWindow.tabs.MySettings$State. This means that state class cannot be serialized properly. Please see https://jb.gg/ij-psoc
    👀 1
    t
    a
    • 3
    • 2
  • n

    natpryce

    04/27/2025, 12:45 PM
    How do I now specify the jvmToolchain in subprojects? My Gradle build does this:
    Copy code
    subprojects {
      ...
      plugins.withType<KotlinPlatformJvmPlugin> {
        kotlin {
          jvmToolchain(21)
        }
      }
    }
    But the KotlinPlatformJvmPlugin class no longer exists in the plugin for Kotlin 21.1.20, and the KotlinJvmPlugin class is internal and cannot be referenced from build scripts.
    h
    • 2
    • 3
  • j

    Júlio Santos

    06/16/2025, 5:22 PM
    Hi guys, what's up? I'd like to use a plugin for test coverage, can you recommend one? Please
    h
    v
    • 3
    • 3
  • s

    stepango

    06/27/2025, 7:21 PM
    Hi folks. I have a burning question, hopefully you'll be interested in solving the mystery with me. At Airbnb we have a pretty cool and beautiful IJ plugin which works like a charm. However there are some cases when it does not work at all - when it installed as a host plugin on remote Intellij IDEA. So our investigation concluded that it's because all UI is written in Compose with https://github.com/JetBrains/jewel So it seems like using Compose for IJ is well supported, except for rendering in host mode. Partial solution to that is to run plugin as client, and in this case UI does work, but most of the other plugin functionality does not. ❓ So the question is, how we can make Compose to render on IJ remote host? I think this should be possible since Swing can do that. Any crazy ideas and suggestions are welcome, we'll probably try them all anyway.
    👀 1
    g
    j
    • 3
    • 6
  • e

    elihart

    07/11/2025, 5:29 PM
    Hey there, we're trying to upgrade our intellij platform gradle plugin version (from 2.1.0 to 2.6.0) and the upgrade causes a new configuration error. Can anyone help point me in the right direction? We use compose desktop for UI in our plugin, and it seems to be having trouble finding the right skiko variant The error is
    Copy code
    > Could not resolve all files for configuration ':intellij-plugin-android:intellijPlatformClasspath'.
       > Could not resolve org.jetbrains.skiko:skiko:0.9.4.2.
         Required by:
             project :intellij-plugin-android > project :intellij-plugin-shared:airchat > org.jetbrains.compose.material3:material3:1.8.1 > org.jetbrains.compose.material3:material3-desktop:1.8.1 > org.jetbrains.compose.foundation:foundation:1.8.1 > org.jetbrains.compose.foundation:foundation-desktop:1.8.1
             project :intellij-plugin-android > project :intellij-plugin-shared:airchat > org.jetbrains.compose.material3:material3:1.8.1 > org.jetbrains.compose.material3:material3-desktop:1.8.1 > org.jetbrains.compose.ui:ui-graphics:1.8.1 > org.jetbrains.compose.ui:ui-graphics-desktop:1.8.1
             project :intellij-plugin-android > project :intellij-plugin-shared:airchat > org.jetbrains.compose.material3:material3:1.8.1 > org.jetbrains.compose.material3:material3-desktop:1.8.1 > org.jetbrains.compose.ui:ui-text:1.8.1 > org.jetbrains.compose.ui:ui-text-desktop:1.8.1
             project :intellij-plugin-android > project :intellij-plugin-shared:base > org.jetbrains.compose.material:material-icons-core:1.7.3 > org.jetbrains.compose.material:material-icons-core-desktop:1.7.3 > org.jetbrains.compose.ui:ui:1.8.1 > org.jetbrains.compose.ui:ui-desktop:1.8.1
          > The consumer was configured to find attribute 'intellijPlatformCollected' with value 'true', attribute 'intellijPlatformExtracted' with value 'true'. However we cannot choose between the following variants of org.jetbrains.skiko:skiko:0.9.4.2:
              - androidApiElements-published
              - androidRuntimeElements-published
              - androidSourcesElements-published
              - awtApiElements-published
              - awtRuntimeElements-published
              - awtSourcesElements-published
              - iosArm64ApiElements-published
              - iosArm64MetadataElements-published
              - iosArm64SourcesElements-published
              - iosSimulatorArm64ApiElements-published
              - iosSimulatorArm64MetadataElements-published
              - iosSimulatorArm64SourcesElements-published
              - iosX64ApiElements-published
              - iosX64MetadataElements-published
              - iosX64SourcesElements-published
              - jsApiElements-published
              - jsRuntimeElements-published
              - jsSourcesElements-published
              - linuxX64ApiElements-published
              - linuxX64SourcesElements-published
              - macosArm64ApiElements-published
              - macosArm64MetadataElements-published
              - macosArm64SourcesElements-published
              - macosX64ApiElements-published
              - macosX64MetadataElements-published
              - macosX64SourcesElements-published
              - metadataApiElements
              - metadataSourcesElements
              - tvosArm64ApiElements-published
              - tvosArm64MetadataElements-published
              - tvosArm64SourcesElements-published
              - tvosSimulatorArm64ApiElements-published
              - tvosSimulatorArm64MetadataElements-published
              - tvosSimulatorArm64SourcesElements-published
              - tvosX64ApiElements-published
              - tvosX64MetadataElements-published
              - tvosX64SourcesElements-published
              - wasmJsApiElements-published
              - wasmJsRuntimeElements-published
              - wasmJsSourcesElements-published
            All of them match the consumer attributes:
    • 1
    • 3
  • o

    Oliver.O

    07/11/2025, 6:11 PM
    I should have asked here, I guess: https://kotlinlang.slack.com/archives/C0B8H786P/p1751729315397549
  • a

    Abe Sol

    07/30/2025, 3:32 PM
    Hi 🙂 I would like to migrate a plugin I didn't write to the K2 mode. There are 6 files (these 3 and these 3) containing deprecated methods which should now use the Analysis API. The https://kotlin.github.io/analysis-api/migrating-from-k1.html is not enough to get me moving. I tried several LLMs without luck. Suggestions would be greatly appreciated. Maybe there is a project in GitHub which did a similar migration?
  • m

    Meet

    08/21/2025, 12:13 PM
    i have one question i install intellij idea community version i one project open it so this download automatic what is that i dont know if possible explain me/
    j
    • 2
    • 4
  • t

    theapache64

    08/23/2025, 4:38 PM
    am getting this warning in web dashboard (verification area), but in code the APIs are neither deprecated nor internal 🤨 what am i missing?
    a
    • 2
    • 2
  • f

    Francisco Noriega

    09/25/2025, 9:28 PM
    'm building a custom ProjectPane, but I am having trouble getting the
    Select Opened File
    (target looking icon) to work. I am overriding
    selectIn
    , with something that ends up calling
    select(virtualFile, virtualFile, requestFocus = true)
    , but its not working. something to note is that the Panel is not showing a 1:1 mapping to the file structure, since it adds grouping nodes, but that shouldn't be too different from what the Android view does with its kotlin+java node or the res/strings node (which don't match exactly with the disk file system) Is there any gotchas or examples on getting this to work?
  • p

    Paul Dingemans

    09/26/2025, 3:19 PM
    I am the maintainer of the
    ktlint-intellij-plugin
    . Currently I am trying to upgrade the plugin so that it can be used in Idea 2025.3 EAP version. The Plugin Verifier fails on retrieving
    ideaIC:253.22441.33
    with message below:
    Copy code
    > Could not resolve all files for configuration ':ktlint-plugin:detachedConfiguration7'.
       > Could not find idea:ideaIC:253.22441.33.
         Searched in the following locations:
           - <https://repo.maven.apache.org/maven2/idea/ideaIC/253.22441.33/ideaIC-253.22441.33.pom>
           - <https://download.jetbrains.com/idea/ideaIC-253.22441.33.tar.gz>
           - <https://download.jetbrains.com/idea/253.22441.33/ideaIC-253.22441.33.tar.gz>
           - <https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/idea/ideaIC/253.22441.33/ideaIC-253.22441.33.pom>
           - <https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/snapshots/idea/ideaIC/253.22441.33/ideaIC-253.22441.33.pom>
           - <https://cache-redirector.jetbrains.com/intellij-dependencies/idea/ideaIC/253.22441.33/ideaIC-253.22441.33.pom>
           - <https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/idea/ideaIC/253.22441.33/ideaIC-253.22441.33.pom>
         Required by:
             project :ktlint-plugin
    This makes sense, given the move to the unified distribution. Also the latest builds page indicates that the above version is invalid, and that I should use platform type
    IU
    instead of
    IC
    . The build of the plugin is based on the intellij plugin template, In the properties, following is configured:
    Copy code
    # IntelliJ Platform Properties -> <https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension>
    platformType = IC
    platformVersion = 2024.1.7
    I expect that changing
    platformType
    from
    IC
    to
    IU
    will fix the verification problem for Idea
    2025.3
    . I am concerned though that the new release of the plugin will not be usable anymore for users of the older (2025.2 and before) Community Editions. Is this concern valid? Or should I make changes (if so, please advise) to remediate this?
  • a

    Abhimanyu

    10/03/2025, 4:28 PM
    Hi kodee welcoming , I am creating a IntelliJ plugin for the first time. I am getting some errors in Marketplace during Compatibility verification, but I don't see the deprecation warning in the code. Could anyone please help share how to resolve this? Also, where can I refer to get the replacement classes/methods for the UI components. e.g.:
    import com.intellij.ui.components.Panel
  • a

    Abhimanyu

    10/03/2025, 7:23 PM
    Hi all kodee greetings , I am getting this error when running my plugin for testing locally. It was working till a few minutes back.
    Copy code
    Plugin 'Material Symbols' (version 1.0.1) was explicitly marked as incompatible with the current version of the IDE
  • s

    Stijndcl

    10/08/2025, 9:49 PM
    I'm writing a plugin for an HTML/JS framework that adds new attributes to existing elements (kinda like the Vue plugin does). I found that I can do most things with Web-Types, but was wondering if there's a way to specify that an attribute's value should be auto-completed as the value for a specific CSS property? Eg, an
    x-color=""
    attribute should get autocompletions solely for css colours (strings, rgb func, gradients, ...), whereas an
    x-transition
    should only show completions for css transitions, etc. Would be great if I could say that attribute X should be completed as if it were css property Y. I assume I can get that done using intellilang/language injections, but was wondering if this is doable with webtypes or the polysymbols API of the platform SDK? The docs also seem to mention an
    inject-language
    property, but I can't find that in the json schema. If this exists, can I pass
    before-
    and
    after-
    fragments here like we can do with Intellilang to achieve my goal? (I couldn't find an existing channel for web-types, if there's a better one to ask this in please let me know)
  • s

    Shaun Wild

    10/29/2025, 10:43 AM
    I get these two messages, like 50% of the time when I restart my IDE plugin, it's very frustrating
    • 1
    • 2
  • s

    Shaun Wild

    10/29/2025, 5:52 PM
    How do I define the icon for a kts file?
    h
    • 2
    • 7