update snippet data

This commit is contained in:
Techatrix 2023-03-25 21:10:15 +01:00 committed by Lee Cannon
parent 29037f2f05
commit 90b468ac9f

View File

@ -40,7 +40,7 @@ pub const generic = [_]Snipped{
.{ .label = "export", .kind = .Keyword },
.{ .label = "extern", .kind = .Keyword },
.{ .label = "fn", .kind = .Keyword, .text = "fn ${1:name}($2) ${3:!void} {$0}" },
.{ .label = "for", .kind = .Keyword, .text = "for ($1) {$0}" },
.{ .label = "for", .kind = .Keyword, .text = "for ($1) |${2:value}| {$0}" },
.{ .label = "if", .kind = .Keyword, .text = "if ($1) {$0}" },
.{ .label = "inline", .kind = .Keyword },
.{ .label = "noalias", .kind = .Keyword },
@ -69,16 +69,12 @@ pub const generic = [_]Snipped{
// keyword snippets
.{ .label = "asmv", .kind = .Snippet, .text = "asm volatile (${1:input}, ${0:input})" },
.{ .label = "pub fn", .kind = .Snippet, .text = "pub fn ${1:name}($2) ${3:!void} {$0}" },
.{ .label = "forv", .kind = .Snippet, .text = "for ($1) |${2:value}| {$0}" },
.{ .label = "fori", .kind = .Snippet, .text = "for ($1) |_, ${2:i}| {$0}" },
.{ .label = "forvi", .kind = .Snippet, .text = "for ($1) |${2:value}, ${3:i}| {$0}" },
.{ .label = "fori", .kind = .Snippet, .text = "for ($1, 0..) |${2:value}, ${3:i}| {$0}" },
.{ .label = "if else", .kind = .Snippet, .text = "if ($1) {$2} else {$0}" },
.{ .label = "catch switch", .kind = .Snippet, .text = "catch |${1:err}| switch (${1:err}) {$0};" },
// snippets
.{ .label = "main", .kind = .Snippet, .text = "pub fn main() !void {$0}" },
.{ .label = "todo", .kind = .Snippet, .text = "std.debug.todo(\"$0\");" },
.{ .label = "print", .kind = .Snippet, .text = "std.debug.print(\"$1\", .{$0});" },
.{ .label = "log err", .kind = .Snippet, .text = "std.log.err(\"$1\", .{$0});" },
.{ .label = "log warn", .kind = .Snippet, .text = "std.log.warn(\"$1\", .{$0});" },
@ -86,16 +82,35 @@ pub const generic = [_]Snipped{
.{ .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 = "anytype", .kind = .Keyword },
.{ .label = "noreturn", .kind = .Keyword },
.{ .label = "type", .kind = .Keyword },
.{ .label = "anyopaque", .kind = .Keyword },
.{ .label = "bool", .kind = .Keyword },
.{ .label = "void", .kind = .Keyword },
.{ .label = "c_int", .kind = .Keyword },
.{ .label = "c_long", .kind = .Keyword },
.{ .label = "c_longdouble", .kind = .Keyword },
.{ .label = "c_longlong", .kind = .Keyword },
.{ .label = "c_short", .kind = .Keyword },
.{ .label = "c_uint", .kind = .Keyword },
.{ .label = "c_ulong", .kind = .Keyword },
.{ .label = "c_ulonglong", .kind = .Keyword },
.{ .label = "c_ushort", .kind = .Keyword },
.{ .label = "comptime_float", .kind = .Keyword },
.{ .label = "comptime_int", .kind = .Keyword },
.{ .label = "f128", .kind = .Keyword },
.{ .label = "f16", .kind = .Keyword },
.{ .label = "f32", .kind = .Keyword },
.{ .label = "f64", .kind = .Keyword },
.{ .label = "f80", .kind = .Keyword },
.{ .label = "false", .kind = .Keyword },
.{ .label = "isize", .kind = .Keyword },
.{ .label = "noreturn", .kind = .Keyword },
.{ .label = "null", .kind = .Keyword },
.{ .label = "true", .kind = .Keyword },
.{ .label = "type", .kind = .Keyword },
.{ .label = "undefined", .kind = .Keyword },
.{ .label = "usize", .kind = .Keyword },
.{ .label = "void", .kind = .Keyword },
.{ .label = "i8", .kind = .Keyword },
.{ .label = "i16", .kind = .Keyword },
.{ .label = "i32", .kind = .Keyword },
@ -106,9 +121,4 @@ pub const generic = [_]Snipped{
.{ .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 },
};