From 245e11e033b1dea6c20231da480d07a1bbca7d9f Mon Sep 17 00:00:00 2001 From: halting Date: Sat, 19 Nov 2022 16:59:12 -0300 Subject: [PATCH] snippets for primitive types (#767) --- src/data/snippets.zig | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/data/snippets.zig b/src/data/snippets.zig index 8479f52..8d428df 100644 --- a/src/data/snippets.zig +++ b/src/data/snippets.zig @@ -23,8 +23,6 @@ pub const generic = [_]Snipped{ .{ .label = "align", .kind = .Keyword }, .{ .label = "allowzero", .kind = .Keyword }, .{ .label = "and", .kind = .Keyword }, - .{ .label = "anyframe", .kind = .Keyword }, - .{ .label = "anytype", .kind = .Keyword }, .{ .label = "asm", .kind = .Keyword }, .{ .label = "async", .kind = .Keyword }, .{ .label = "await", .kind = .Keyword }, @@ -86,4 +84,30 @@ pub const generic = [_]Snipped{ .{ .label = "log warn", .kind = .Snippet, .text = "std.log.warn(\"$1\", .{$0});" }, .{ .label = "log info", .kind = .Snippet, .text = "std.log.info(\"$1\", .{$0});" }, .{ .label = "log debug", .kind = .Snippet, .text = "std.log.debug(\"$1\", .{$0});" }, + + // types + .{ .label = "anyopaque", .kind = .Keyword }, + .{ .label = "anyerror", .kind = .Keyword }, + .{ .label = "anyframe", .kind = .Keyword }, + .{ .label = "noreturn", .kind = .Keyword }, + .{ .label = "type", .kind = .Keyword }, + .{ .label = "bool", .kind = .Keyword }, + .{ .label = "void", .kind = .Keyword }, + .{ .label = "isize", .kind = .Keyword }, + .{ .label = "usize", .kind = .Keyword }, + .{ .label = "i8", .kind = .Keyword }, + .{ .label = "i16", .kind = .Keyword }, + .{ .label = "i32", .kind = .Keyword }, + .{ .label = "i64", .kind = .Keyword }, + .{ .label = "i128", .kind = .Keyword }, + .{ .label = "u8", .kind = .Keyword }, + .{ .label = "u16", .kind = .Keyword }, + .{ .label = "u32", .kind = .Keyword }, + .{ .label = "u64", .kind = .Keyword }, + .{ .label = "u128", .kind = .Keyword }, + .{ .label = "f16", .kind = .Keyword }, + .{ .label = "f32", .kind = .Keyword }, + .{ .label = "f64", .kind = .Keyword }, + .{ .label = "f80", .kind = .Keyword }, + .{ .label = "f128", .kind = .Keyword }, };