diff --git a/topics/intro/content_updates.md b/topics/intro/content_updates.md index b22b07fb9..0fad95bea 100644 --- a/topics/intro/content_updates.md +++ b/topics/intro/content_updates.md @@ -17,6 +17,7 @@ See [GitHub Changelog](https://github.com/JetBrains/intellij-sdk-docs/commits/ma Minor Changes and Additions : - How to support [grammar checks](spell_checking.md#grammar-checks) provided by Grazie plugin in custom languages. +- How to provide [code vision provider](inlay_hints.md#code-vision-provider) name and description in the settings. ### April {april-24} diff --git a/topics/reference_guide/custom_language_support/inlay_hints.md b/topics/reference_guide/custom_language_support/inlay_hints.md index f4946b20a..c8dfa40b0 100644 --- a/topics/reference_guide/custom_language_support/inlay_hints.md +++ b/topics/reference_guide/custom_language_support/inlay_hints.md @@ -86,11 +86,16 @@ It is configurable by users in Settings | Editor | Inlay Hints | Code v There are two extension points for implementing a code vision provider: - [`DaemonBoundCodeVisionProvider`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/hints/codeVision/DaemonBoundCodeVisionProvider.kt) registered in `com.intellij.codeInsight.daemonBoundCodeVisionProvider` EP - [`CodeVisionProvider`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/codeVision/CodeVisionProvider.kt) registered in `com.intellij.codeInsight.codeVisionProvider` EP +- [`CodeVisionGroupSettingProvider`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/codeVision/settings/CodeVisionGroupSettingProvider.kt) registered in `com.intellij.config.codeVisionGroupSettingProvider` EP `DaemonBoundCodeVisionProvider` API should be used in cases when code vision entries are related to PSI, so that calculated values are invalidated and recalculated on PSI changes. `CodeVisionProvider` API should be used for cases when presented information doesn't depend on the PSI. +The `CodeVisionGroupSettingProvider` is necessary for displaying the name and description of the code vision provider in the settings. +The `groupId` must match the value specified in the implementation of the `CodeVisionProvider`; if not specified, it defaults to the `id`. +The `groupName` is the name shown in the code vision group, and the `description` will be visible in the right details panel. + **Examples:** - [`JavaInheritorsCodeVisionProvider`](%gh-ic%/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaInheritorsCodeVisionProvider.kt) - shows number of Java class or method inheritors. Clicking the inlay hint opens the list of inheritors. This provider is `DaemonBoundCodeVisionProvider`. - [`JavaReferencesCodeVisionProvider`](%gh-ic%/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaReferencesCodeVisionProvider.kt) - shows number of usages of Java class or member. Clicking the inlay opens the list of usages or navigates to the usage if only one exists. This provider is `DaemonBoundCodeVisionProvider`.