diff --git a/nixd/lib/Controller/Hover.cpp b/nixd/lib/Controller/Hover.cpp index 725acd438..64f5656fa 100644 --- a/nixd/lib/Controller/Hover.cpp +++ b/nixd/lib/Controller/Hover.cpp @@ -164,7 +164,7 @@ void Controller::onHover(const TextDocumentPositionParams &Params, Docs += "? (missing type)"; } if (Desc->Description) { - Docs += "\n" + Desc->Description.value_or(""); + Docs += "\n\n" + Desc->Description.value_or(""); } Reply(Hover{ .contents = diff --git a/nixd/tools/nixd/test/hover-options.md b/nixd/tools/nixd/test/hover-options.md index 35583a333..87e99ec00 100644 --- a/nixd/tools/nixd/test/hover-options.md +++ b/nixd/tools/nixd/test/hover-options.md @@ -64,7 +64,7 @@ CHECK-NEXT: "jsonrpc": "2.0", CHECK-NEXT: "result": { CHECK-NEXT: "contents": { CHECK-NEXT: "kind": "markdown", -CHECK-NEXT: "value": " (hello type)\ntest" +CHECK-NEXT: "value": " (hello type)\n\ntest" CHECK-NEXT: }, CHECK-NEXT: "range": { CHECK-NEXT: "end": {