diff --git a/src/analysis.zig b/src/analysis.zig index 7bad32a..76b7fc5 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -62,7 +62,7 @@ fn collectDocComments(allocator: *std.mem.Allocator, tree: *ast.Tree, doc_commen } } - return try std.mem.join(allocator, "\n", lines.items); + return try std.mem.join(allocator, "\\\n", lines.items); } /// Gets a function signature (keywords, name, return value) diff --git a/src/main.zig b/src/main.zig index 8933565..cdfbbc0 100644 --- a/src/main.zig +++ b/src/main.zig @@ -376,7 +376,7 @@ fn hoverSymbol(id: i64, analysis_ctx: *DocumentStore.AnalysisContext, decl: *std else => analysis.nodeToString(result.analysis_ctx.tree(), result.decl) orelse return try respondGeneric(id, null_result_response), }; - const md_string = try std.fmt.allocPrint(&analysis_ctx.arena.allocator, "```zig\n{}\n```\n```markdown\n{}\n```", .{ signature_str, doc_str }); + const md_string = try std.fmt.allocPrint(&analysis_ctx.arena.allocator, "```zig\n{}\n```\n{}", .{ signature_str, doc_str }); try send(types.Response{ .id = .{ .Integer = id }, .result = .{