From 59c18134ac92bb9444f9e37fd52ea428b4065e9f Mon Sep 17 00:00:00 2001 From: Eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:36:01 +1100 Subject: [PATCH] fix: issues with pr #491 (#531) * fix(zig): fix buildexe name escape * fix(zig): libraries spelling * chore(zig): removed an unneeded comma * fix(zig): json formatting * fix(cmake): package json formatting * chore(zig): reformatted zig json to proper standard --- package.json | 8 ++++---- snippets/zig.json | 50 ++++++++++++++++++++++------------------------- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 1c6c7167..f33d7b10 100644 --- a/package.json +++ b/package.json @@ -584,10 +584,10 @@ "language": "loremipsum", "path": "./snippets/loremipsum.json" }, - { - "language": "cmake", - "path": "./snippets/cmake.json" - }, + { + "language": "cmake", + "path": "./snippets/cmake.json" + }, { "language": "zig", "path": "./snippets/zig.json" diff --git a/snippets/zig.json b/snippets/zig.json index 7a06b3ee..19a72c4b 100644 --- a/snippets/zig.json +++ b/snippets/zig.json @@ -1,29 +1,25 @@ { - "Import": { - "prefix": "import", - "body": ["const ${1} = @import(\"${1}\")"], - "description": "Importing Librarys" - }, - "CImport": { - "prefix": "cimport", - "body": [ - "const c = @cImport({", - "@cDefine(\"${1}\")", - "});" - ], - "description": "Importing C Header Files" - }, - "buildExe": { - "prefix": "bExe", - "body": [ - "const exe = b.addExecutable(.{", - ".name = \"${1}",\", - ".root_source_file = b.path(\"${2: path}\"),", - ".target = target,", - ".optimize = optimize,", - "});", - "\n\n\n b.installArtifact(exe);", - ], - "description": "Building an exe" - } + "Import": { + "prefix": "import", + "body": ["const ${1} = @import(\"${1}\")"], + "description": "Importing Libraries" + }, + "CImport": { + "prefix": "cimport", + "body": ["const c = @cImport({", " @cDefine(\"${1}\")", "});"], + "description": "Importing C Header Files" + }, + "buildExe": { + "prefix": "bExe", + "body": [ + "const exe = b.addExecutable(.{", + " .name = \"${1}\",", + " .root_source_file = b.path(\"${2:path}\"),", + " .target = target,", + " .optimize = optimize,", + "});", + "b.installArtifact(exe);" + ], + "description": "Building an exe" + } }