How to add an icon like this in the editor?
已回答
what should I do
请先登录再写评论。
It's handled with an inlay hint. Check the IntelliJ Platform Explorer: com.intellij.codeInsight.inlayProvider for some of the existing implementation examples.
https://plugins.jetbrains.com/intellij-platform-explorer?extensions=com.intellij.codeInsight.inlayProvider