Completion: do not bold top-level functions
This commit is contained in:
@@ -40,7 +40,10 @@ public object KotlinLookupElementFactory {
|
|||||||
DescriptorUtils.unwrapFakeOverride(descriptor)
|
DescriptorUtils.unwrapFakeOverride(descriptor)
|
||||||
else
|
else
|
||||||
descriptor
|
descriptor
|
||||||
val bold = boldImmediateMembers && descriptor is CallableMemberDescriptor && descriptor.getKind() == CallableMemberDescriptor.Kind.DECLARATION
|
val bold = boldImmediateMembers
|
||||||
|
&& descriptor is CallableMemberDescriptor
|
||||||
|
&& descriptor.getContainingDeclaration() is ClassifierDescriptor
|
||||||
|
&& descriptor.getKind() == CallableMemberDescriptor.Kind.DECLARATION
|
||||||
return createLookupElement(analyzer, _descriptor, DescriptorToSourceUtils.descriptorToDeclaration(_descriptor), bold)
|
return createLookupElement(analyzer, _descriptor, DescriptorToSourceUtils.descriptorToDeclaration(_descriptor), bold)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
fun globalFun(){}
|
||||||
|
|
||||||
trait T {
|
trait T {
|
||||||
fun fromTrait(){}
|
fun fromTrait(){}
|
||||||
}
|
}
|
||||||
@@ -22,3 +24,4 @@ class Derived : Base() {
|
|||||||
// EXIST: { itemText: "fromBase", attributes: "" }
|
// EXIST: { itemText: "fromBase", attributes: "" }
|
||||||
// EXIST: { itemText: "hashCode", attributes: "" }
|
// EXIST: { itemText: "hashCode", attributes: "" }
|
||||||
// EXIST: { itemText: "equals", attributes: "" }
|
// EXIST: { itemText: "equals", attributes: "" }
|
||||||
|
// EXIST: { itemText: "globalFun", attributes: "" }
|
||||||
|
|||||||
Reference in New Issue
Block a user