aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Kotlin/KotlinLanguageService.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt
index dd63705b..77cad657 100644
--- a/src/Kotlin/KotlinLanguageService.kt
+++ b/src/Kotlin/KotlinLanguageService.kt
@@ -333,12 +333,15 @@ class KotlinLanguageService : LanguageService {
identifierOrDeprecated(node)
symbol("(")
- renderList(node.details(DocumentationNode.Kind.Parameter)) {
+ val parameters = node.details(DocumentationNode.Kind.Parameter)
+ renderList(parameters) {
indentedSoftLineBreak()
renderParameter(it, renderMode)
}
if (needReturnType(node)) {
- softLineBreak()
+ if (parameters.isNotEmpty()) {
+ softLineBreak()
+ }
symbol(")")
symbol(": ")
renderType(node.detail(DocumentationNode.Kind.Type), renderMode)