Skip to content

Commit

Permalink
fix: issues with pr #491 (#531)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Eveeifyeve authored Dec 2, 2024
1 parent dfa2d9e commit 59c1813
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
50 changes: 23 additions & 27 deletions snippets/zig.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 59c1813

Please sign in to comment.