Merge pull request #763 from thalting/master

update snippets
This commit is contained in:
Lee Cannon 2022-11-17 14:52:37 +00:00 committed by GitHub
commit 88ed500439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,9 +74,9 @@ pub const generic = [_]Snipped{
.{ .label = "pub fn", .kind = .Snippet, .text = "pub fn ${1:name}($2) ${3:!void} {$0}" }, .{ .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 = "forv", .kind = .Snippet, .text = "for ($1) |${2:value}| {$0}" },
.{ .label = "fori", .kind = .Snippet, .text = "for ($1) |_, ${2:i}| {$0}" }, .{ .label = "fori", .kind = .Snippet, .text = "for ($1) |_, ${2:i}| {$0}" },
.{ .label = "forvi", .kind = .Snippet, .text = "for ($1) |${2:value},${3:i}| {$0}" }, .{ .label = "forvi", .kind = .Snippet, .text = "for ($1) |${2:value}, ${3:i}| {$0}" },
.{ .label = "if else", .kind = .Snippet, .text = "if ($1) {$2} else {$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};" }, .{ .label = "catch switch", .kind = .Snippet, .text = "catch |${1:err}| switch (${1:err}) {$0};" },
// snippets // snippets
.{ .label = "main", .kind = .Snippet, .text = "pub fn main() !void {$0}" }, .{ .label = "main", .kind = .Snippet, .text = "pub fn main() !void {$0}" },