kinda fix struct completion - still needs an actual fix

This commit is contained in:
SuperAuguste 2020-07-17 23:21:17 -04:00
parent 76dcc8cbe2
commit a1c0f86066
No known key found for this signature in database
GPG Key ID: BBBFB75D16C221FD

View File

@ -458,6 +458,18 @@ fn nodeToCompletion(
.kind = .Field,
});
},
.ContainerDecl => {
log(std.log.Level.debug, .cont, "Unhandled container decl", .{});
const container = node.castTag(.ContainerDecl).?;
for (container.fieldsAndDecls()) |snode|
if (snode.castTag(.ContainerField)) |field|
try list.append(.{
.label = handle.tree.tokenSlice(field.name_token),
.kind = .Field,
.documentation = doc,
.detail = analysis.getContainerFieldSignature(handle.tree, field),
});
},
else => if (analysis.nodeToString(handle.tree, node)) |string| {
try list.append(.{
.label = string,