Completion: do not bold top-level functions
This commit is contained in:
@@ -40,7 +40,10 @@ public object KotlinLookupElementFactory {
|
||||
DescriptorUtils.unwrapFakeOverride(descriptor)
|
||||
else
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
fun globalFun(){}
|
||||
|
||||
trait T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
@@ -22,3 +24,4 @@ class Derived : Base() {
|
||||
// EXIST: { itemText: "fromBase", attributes: "" }
|
||||
// EXIST: { itemText: "hashCode", attributes: "" }
|
||||
// EXIST: { itemText: "equals", attributes: "" }
|
||||
// EXIST: { itemText: "globalFun", attributes: "" }
|
||||
|
||||
Reference in New Issue
Block a user