Skip to content

Commit 59c1813

Browse files
authored
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
1 parent dfa2d9e commit 59c1813

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,10 @@
584584
"language": "loremipsum",
585585
"path": "./snippets/loremipsum.json"
586586
},
587-
{
588-
"language": "cmake",
589-
"path": "./snippets/cmake.json"
590-
},
587+
{
588+
"language": "cmake",
589+
"path": "./snippets/cmake.json"
590+
},
591591
{
592592
"language": "zig",
593593
"path": "./snippets/zig.json"

snippets/zig.json

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
{
2-
"Import": {
3-
"prefix": "import",
4-
"body": ["const ${1} = @import(\"${1}\")"],
5-
"description": "Importing Librarys"
6-
},
7-
"CImport": {
8-
"prefix": "cimport",
9-
"body": [
10-
"const c = @cImport({",
11-
"@cDefine(\"${1}\")",
12-
"});"
13-
],
14-
"description": "Importing C Header Files"
15-
},
16-
"buildExe": {
17-
"prefix": "bExe",
18-
"body": [
19-
"const exe = b.addExecutable(.{",
20-
".name = \"${1}",\",
21-
".root_source_file = b.path(\"${2: path}\"),",
22-
".target = target,",
23-
".optimize = optimize,",
24-
"});",
25-
"\n\n\n b.installArtifact(exe);",
26-
],
27-
"description": "Building an exe"
28-
}
2+
"Import": {
3+
"prefix": "import",
4+
"body": ["const ${1} = @import(\"${1}\")"],
5+
"description": "Importing Libraries"
6+
},
7+
"CImport": {
8+
"prefix": "cimport",
9+
"body": ["const c = @cImport({", " @cDefine(\"${1}\")", "});"],
10+
"description": "Importing C Header Files"
11+
},
12+
"buildExe": {
13+
"prefix": "bExe",
14+
"body": [
15+
"const exe = b.addExecutable(.{",
16+
" .name = \"${1}\",",
17+
" .root_source_file = b.path(\"${2:path}\"),",
18+
" .target = target,",
19+
" .optimize = optimize,",
20+
"});",
21+
"b.installArtifact(exe);"
22+
],
23+
"description": "Building an exe"
24+
}
2925
}

0 commit comments

Comments
 (0)