fix empty comments
This commit is contained in:
parent
bc597025e7
commit
18c026372b
@ -222,11 +222,10 @@ fn publishDiagnostics(document: *types.TextDocument, config: Config) !void {
|
||||
}
|
||||
|
||||
fn nodeToCompletion(alloc: *std.mem.Allocator, tree: *std.zig.ast.Tree, decl: *std.zig.ast.Node, config: Config) !?types.CompletionItem {
|
||||
var doc_comments = try analysis.getDocComments(alloc, tree, decl);
|
||||
var doc = types.MarkupContent{
|
||||
var doc = if (try analysis.getDocComments(alloc, tree, decl)) |doc_comments| types.MarkupContent{
|
||||
.kind = .Markdown,
|
||||
.value = doc_comments orelse "",
|
||||
};
|
||||
.value = doc_comments,
|
||||
} else null;
|
||||
|
||||
switch (decl.id) {
|
||||
.FnProto => {
|
||||
|
Loading…
Reference in New Issue
Block a user