This repository was archived by the owner on Nov 25, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathpackage.json
More file actions
437 lines (437 loc) · 14.8 KB
/
package.json
File metadata and controls
437 lines (437 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
{
"name": "vscode-zig",
"displayName": "Zig Language",
"description": "Language support for the Zig programming language",
"version": "0.6.17",
"publisher": "ziglang",
"icon": "images/zig-icon.png",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/ziglang/vscode-zig"
},
"engines": {
"vscode": "^1.90.0"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"workspaceContains:build.zig",
"workspaceContains:build.zig.zon",
"workspaceContains:./.zigversion"
],
"main": "./out/extension",
"contributes": {
"configurationDefaults": {
"[zig]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ziglang.vscode-zig",
"editor.stickyScroll.defaultModel": "foldingProviderModel",
"files.eol": "\n"
},
"explorer.autoRevealExclude": {
"**/.zig-cache": true,
"**/zig-cache": true
}
},
"languages": [
{
"id": "zig",
"extensions": [
".zig",
".zon"
],
"aliases": [
"Zig"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "zig",
"scopeName": "source.zig",
"path": "./syntaxes/zig.tmLanguage.json"
}
],
"problemMatchers": [
{
"name": "zig",
"owner": "zig",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "([^\\s]*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(note|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "^Build Summary:",
"endsPattern": "^error: (\\d+ compilation errors|the following command failed with )"
}
}
],
"taskDefinitions": [
{
"type": "zig"
}
],
"configuration": {
"type": "object",
"title": "Zig",
"properties": {
"zig.path": {
"scope": "machine-overridable",
"type": "string",
"description": "Set a custom path to the `zig` executable. Example: `C:/zig-windows-x86_64-0.13.0/zig.exe`. The string \"zig\" means lookup zig in PATH."
},
"zig.version": {
"scope": "resource",
"type": "string",
"description": "Specify which Zig version should be installed. Takes priority over a `.zigversion` file or a `build.zig.zon` with `minimum_zig_version`."
},
"zig.formattingProvider": {
"scope": "resource",
"type": "string",
"description": "Whether to enable formatting",
"enum": [
"off",
"extension",
"zls"
],
"enumItemLabels": [
"Off",
"Extension",
"ZLS language server"
],
"enumDescriptions": [
"Disable formatting",
"Provide formatting by directly invoking `zig fmt`",
"Provide formatting by using ZLS (which matches `zig fmt`)"
],
"default": "zls"
},
"zig.testArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"test",
"--test-filter",
"${filter}",
"${path}"
],
"description": "Arguments to pass to 'zig' for running tests. Supported variables: ${filter}, ${path}.\n\nTo use test filter with a build script define a custom option to pass it to: `-Dtest-filter=${filter}`."
},
"zig.debugTestArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"test",
"${path}",
"--test-filter",
"${filter}",
"--test-no-exec",
"-femit-bin=${binaryPath}"
],
"description": "Arguments to pass to 'zig' for debugging tests. Supported variables: ${filter}, ${path}, ${binaryPath}.\n\nTo debug a test with a build script add a step that installs the test binary at `zig-out/bin/debug-unit-tests`:\n```zig\nb.step(\"debug-test-unit\", \"Debug unit tests\").dependOn(&b.addInstallArtifact(unit_tests, .{ .dest_sub_path = \"debug-unit-tests\" }).step);\n```"
},
"zig.debugAdapter": {
"scope": "resource",
"type": "string",
"default": "lldb",
"description": "The debug adapter command to run when starting a debug session"
},
"zig.buildOnSaveProvider": {
"scope": "resource",
"type": "string",
"description": "Specify how build on save diagnostics should be provided.",
"enum": [
"off",
"auto",
"extension",
"zls"
],
"enumItemLabels": [
"Disabled",
"Automatic",
"Extension",
"ZLS language server"
],
"enumDescriptions": [
"Disable build on save",
"Disabled unless ZLS has enabled [build on save](https://zigtools.org/zls/guides/build-on-save/) automatically.",
"Provide build on save by running `zig build --watch`",
"Provide build on save using ZLS"
],
"default": "auto"
},
"zig.buildOnSaveArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Specify which additional arguments should be passed to `zig build` when running build on save. Use the `--build-file` argument to override which build file should be used."
},
"zig.zls.debugLog": {
"scope": "resource",
"type": "boolean",
"description": "Enable debug logging in release builds of ZLS."
},
"zig.zls.trace.server": {
"scope": "window",
"type": "string",
"description": "Traces the communication between VS Code and the ZLS language server.\n\nThe log output can be accessed by running the \"Developer: Show Logs...\" command and selecting \"ZLS language server\". To display trace messages, use \"Developer: Set Log Level...\" or click the settings (⚙️) icon in the top-right corner of the output panel.",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off"
},
"zig.zls.enabled": {
"scope": "resource",
"type": "string",
"description": "Whether to enable the optional ZLS language server",
"enum": [
"ask",
"off",
"on"
],
"default": "ask"
},
"zig.zls.path": {
"scope": "machine-overridable",
"type": "string",
"description": "Set a custom path to the `zls` executable. Example: `C:/zls/zig-cache/bin/zls.exe`. The string \"zls\" means lookup ZLS in PATH.",
"format": "path"
},
"zig.zls.enableSnippets": {
"scope": "resource",
"type": "boolean",
"description": "Enables snippet completions when the client also supports them",
"default": true
},
"zig.zls.enableArgumentPlaceholders": {
"scope": "resource",
"type": "boolean",
"description": "Whether to enable function argument placeholder completions",
"default": true
},
"zig.zls.completionLabelDetails": {
"scope": "resource",
"type": "boolean",
"description": "Whether to show the function signature in completion results. May improve readability in some editors when disabled",
"default": true
},
"zig.zls.semanticTokens": {
"scope": "resource",
"type": "string",
"description": "Set level of semantic tokens. `partial` only includes information that requires semantic analysis; this will usually give a better result than `full` in VS Code thanks to the Zig extension's syntax file.",
"enum": [
"none",
"partial",
"full"
],
"default": "partial"
},
"zig.zls.inlayHintsShowVariableTypeHints": {
"scope": "resource",
"type": "boolean",
"description": "Enable inlay hints for variable types",
"default": true
},
"zig.zls.inlayHintsShowStructLiteralFieldType": {
"scope": "resource",
"type": "boolean",
"description": "Enable inlay hints for fields in struct and union literals",
"default": true
},
"zig.zls.inlayHintsShowParameterName": {
"scope": "resource",
"type": "boolean",
"description": "Enable inlay hints for parameter names",
"default": true
},
"zig.zls.inlayHintsShowBuiltin": {
"scope": "resource",
"type": "boolean",
"description": "Enable inlay hints for builtin functions",
"default": true
},
"zig.zls.inlayHintsExcludeSingleArgument": {
"scope": "resource",
"type": "boolean",
"description": "Don't show inlay hints for single argument calls",
"default": true
},
"zig.zls.inlayHintsHideRedundantParamNames": {
"scope": "resource",
"type": "boolean",
"description": "Hides inlay hints when parameter name matches the identifier (e.g. `foo: foo`)",
"default": false
},
"zig.zls.inlayHintsHideRedundantParamNamesLastToken": {
"scope": "resource",
"type": "boolean",
"description": "Hides inlay hints when parameter name matches the last token of a parameter node (e.g. `foo: bar.foo`, `foo: &foo`)",
"default": false
},
"zig.zls.warnStyle": {
"scope": "resource",
"type": "boolean",
"description": "Enables warnings for style guideline mismatches",
"default": false
},
"zig.zls.highlightGlobalVarDeclarations": {
"scope": "resource",
"type": "boolean",
"description": "Whether to highlight global var declarations",
"default": false
},
"zig.zls.skipStdReferences": {
"scope": "resource",
"type": "boolean",
"description": "When true, skips searching for references in the standard library. Improves lookup speed for functions in user's code. Renaming and go-to-definition will continue to work as is",
"default": false
},
"zig.zls.preferAstCheckAsChildProcess": {
"scope": "resource",
"type": "boolean",
"description": "Favor using `zig ast-check` instead of the builtin one",
"default": true
},
"zig.zls.builtinPath": {
"scope": "resource",
"type": "string",
"description": "Override the path to 'builtin' module. Automatically resolved if unset.",
"format": "path"
},
"zig.zls.zigLibPath": {
"scope": "resource",
"type": "string",
"description": "Override the Zig library path. Will be automatically resolved using the 'zig_exe_path'.",
"format": "path"
},
"zig.zls.buildRunnerPath": {
"scope": "resource",
"type": "string",
"description": "Specify a custom build runner to resolve build system information.",
"format": "path"
},
"zig.zls.globalCachePath": {
"scope": "resource",
"type": "string",
"description": "Path to a directory that will be used as zig's cache. Will default to `${KnownFolders.Cache}/zls`.",
"format": "path"
},
"zig.zls.additionalOptions": {
"scope": "resource",
"type": "object",
"markdownDescription": "Additional config options that should be forwarded to ZLS. Every property must have the format 'zig.zls.someOptionName'. You will **not** be warned about unused or ignored options.",
"default": {},
"additionalProperties": false,
"patternProperties": {
"^zig\\.zls\\.[a-z]+[A-Z0-9][a-z0-9]+[A-Za-z0-9]*$": {}
}
}
}
},
"commands": [
{
"command": "zig.run",
"title": "Run Zig",
"category": "Zig",
"description": "Run the current Zig project / file"
},
{
"command": "zig.debug",
"title": "Debug Zig",
"category": "Zig",
"description": "Debug the current Zig project / file"
},
{
"command": "zig.install",
"title": "Install Zig",
"category": "Zig Setup"
},
{
"command": "zig.toggleMultilineStringLiteral",
"title": "Toggle Multiline String Literal",
"category": "Zig"
},
{
"command": "zig.zls.enable",
"title": "Enable Language Server",
"category": "ZLS language server"
},
{
"command": "zig.zls.startRestart",
"title": "Start / Restart Language Server",
"category": "ZLS language server"
},
{
"command": "zig.zls.stop",
"title": "Stop Language Server",
"category": "ZLS language server"
}
],
"keybindings": [
{
"command": "zig.toggleMultilineStringLiteral",
"key": "alt+m alt+s",
"when": "editorTextFocus && editorLangId == 'zig'"
}
],
"jsonValidation": [
{
"fileMatch": "zls.json",
"url": "https://raw.githubusercontent.com/zigtools/zls/master/schema.json"
}
]
},
"scripts": {
"vscode:prepublish": "npm run build-base -- --minify",
"build-base": "esbuild --bundle --external:vscode src/extension.ts --outdir=out --platform=node --target=node20 --format=cjs",
"build": "npm run build-base -- --sourcemap",
"watch": "npm run build-base -- --sourcemap --watch",
"test": "npm run compile && node ./node_modules/vscode/bin/test",
"typecheck": "tsc --noEmit",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint"
},
"devDependencies": {
"@types/libsodium-wrappers": "^0.7.14",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.0.0",
"@types/semver": "^7.5.8",
"@types/vscode": "^1.80.0",
"@types/which": "^2.0.1",
"@vscode/vsce": "^2.24.0",
"esbuild": "^0.25.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "3.2.5",
"typescript": "^5.4.3",
"typescript-eslint": "^8.0.0"
},
"dependencies": {
"libsodium-wrappers": "^0.7.15",
"lodash-es": "^4.17.21",
"semver": "^7.5.2",
"vscode-languageclient": "10.0.0-next.15",
"which": "^3.0.0"
}
}