Skip to content

Commit 864ed93

Browse files
committed
Show mods.toml value type on key completion
1 parent eaf47ab commit 864ed93

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/kotlin/toml/platform/forge/completion/ModsTomlCompletionContributor.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ object ModsTomlKeyCompletionProvider : CompletionProvider<CompletionParameters>(
126126

127127
result.addAllElements(
128128
variants.map { entry ->
129-
LookupElementBuilder.create(entry, entry.key).withInsertHandler(TomlKeyInsertionHandler(keyValue))
129+
var lookup = LookupElementBuilder.create(entry, entry.key)
130+
.withInsertHandler(TomlKeyInsertionHandler(keyValue))
131+
if (entry.type != null) {
132+
lookup = lookup.withTypeText(entry.type.presentableName)
133+
}
134+
lookup
130135
}
131136
)
132137
}

0 commit comments

Comments
 (0)