Skip to content

Commit

Permalink
Show mods.toml value type on key completion
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNesto committed Sep 28, 2024
1 parent eaf47ab commit 864ed93
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ object ModsTomlKeyCompletionProvider : CompletionProvider<CompletionParameters>(

result.addAllElements(
variants.map { entry ->
LookupElementBuilder.create(entry, entry.key).withInsertHandler(TomlKeyInsertionHandler(keyValue))
var lookup = LookupElementBuilder.create(entry, entry.key)
.withInsertHandler(TomlKeyInsertionHandler(keyValue))
if (entry.type != null) {
lookup = lookup.withTypeText(entry.type.presentableName)
}
lookup
}
)
}
Expand Down

0 comments on commit 864ed93

Please sign in to comment.