File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed 
src/main/kotlin/io/github/andrelmv/plugin/inlay Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 44
55## [ Unreleased]  
66
7+ ### Added  
8+ -  Support to KtCollectionLiteralExpression inlay hint
9+ 
710## [ 1.0.3]  - 2024-08-12 
811
912### Changed  
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import org.jetbrains.kotlin.idea.caches.resolve.analyze
88import  org.jetbrains.kotlin.idea.intentions.loopToCallChain.isConstant 
99import  org.jetbrains.kotlin.idea.structuralsearch.visitor.KotlinRecursiveElementVisitor 
1010import  org.jetbrains.kotlin.psi.KtBinaryExpression 
11+ import  org.jetbrains.kotlin.psi.KtCollectionLiteralExpression 
1112import  org.jetbrains.kotlin.psi.KtExpression 
1213import  org.jetbrains.kotlin.psi.KtNameReferenceExpression 
1314import  org.jetbrains.kotlin.psi.KtNamedFunction 
@@ -65,10 +66,10 @@ class InlayStringInterpolationHintCollector(
6566
6667private  fun  PsiElement.isKtNameReferenceExpression (): Boolean  {
6768    return  this  is  KtNameReferenceExpression 
68-             &&  ((this .context is  KtValueArgument  &&  this .isConstant())
69+             &&  ((this .context is  KtCollectionLiteralExpression  &&  this .isConstant())
70+             ||  (this .context is  KtValueArgument  &&  this .isConstant())
6971            ||  this .context is  KtNamedFunction 
7072            ||  this .context is  KtBinaryExpression )
71- 
7273}
7374
7475private  fun  PsiElement.isKtStringTemplateExpression (): Boolean  {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments