-
Notifications
You must be signed in to change notification settings - Fork 59
/
package.json
397 lines (397 loc) · 13.1 KB
/
package.json
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
{
"name": "vscode-zig",
"displayName": "Zig Language",
"description": "Language support for the Zig programming language",
"version": "0.6.3",
"publisher": "ziglang",
"icon": "images/zig-icon.png",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/ziglang/vscode-zig"
},
"engines": {
"vscode": "^1.80.0"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"workspaceContains:build.zig",
"workspaceContains:build.zig.zon"
],
"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
}
}
],
"configuration": {
"type": "object",
"title": "Zig",
"properties": {
"zig.buildOnSave": {
"type": "boolean",
"default": false,
"description": "Compiles code on file save using the settings specified in 'Build Option'."
},
"zig.buildOption": {
"type": "string",
"default": "build",
"enum": [
"build",
"build-exe",
"build-lib",
"build-obj"
],
"description": "Which build command Zig should use to build the code."
},
"zig.buildArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Extra arguments to passed to Zig."
},
"zig.buildFilePath": {
"type": "string",
"default": "${workspaceFolder}/build.zig",
"description": "The path to build.zig. This is only required if zig.buildOptions = build."
},
"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.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 language server.",
"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.enableBuildOnSave": {
"scope": "resource",
"type": "boolean",
"description": "Whether to enable build-on-save diagnostics. Will be automatically enabled if the `build.zig` has declared a 'check' step.",
"default": null
},
"zig.zls.buildOnSaveArgs": {
"scope": "resource",
"type": "array",
"description": "Specify which arguments should be passed to Zig when running build-on-save.\n\nIf the `build.zig` has declared a 'check' step, it will be preferred over the default 'install' step.",
"default": []
},
"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 std. 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 ZLS's fork",
"default": true
},
"zig.zls.builtinPath": {
"scope": "resource",
"type": "string",
"description": "Path to 'builtin;' useful for debugging, automatically set if let null",
"format": "path"
},
"zig.zls.zigLibPath": {
"scope": "resource",
"type": "string",
"description": "Zig library path, e.g. `/path/to/zig/lib/zig`, used to analyze std library imports",
"format": "path"
},
"zig.zls.buildRunnerPath": {
"scope": "resource",
"type": "string",
"description": "Path to the `build_runner.zig` file provided by ZLS. null is equivalent to `${executable_directory}/build_runner.zig`",
"format": "path"
},
"zig.zls.globalCachePath": {
"scope": "resource",
"type": "string",
"description": "Path to a directory that will be used as zig's cache. null is equivalent to `${KnownFolders.Cache}/zls`",
"format": "path"
},
"zig.zls.completionLabelDetails": {
"scope": "resource",
"type": "boolean",
"description": "When false, the function signature of completion results is hidden. Improves readability in some editors",
"default": true
},
"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.build.workspace",
"title": "Build Workspace",
"category": "Zig",
"description": "Build the current project using 'zig build'"
},
{
"command": "zig.install",
"title": "Install Zig",
"category": "Zig Setup"
},
{
"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"
}
],
"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 --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 .",
"lint": "eslint ."
},
"devDependencies": {
"@types/libsodium-wrappers": "^0.7.14",
"@types/lodash-es": "^4.17.12",
"@types/mocha": "^2.2.48",
"@types/node": "^18.0.0",
"@types/vscode": "^1.80.0",
"@types/which": "^2.0.1",
"@vscode/test-electron": "^2.3.9",
"@vscode/vsce": "^2.24.0",
"esbuild": "^0.12.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "3.2.5",
"typescript": "^5.4.3",
"typescript-eslint": "^7.4.0"
},
"dependencies": {
"axios": "^1.7.4",
"camelcase": "^7.0.1",
"libsodium-wrappers": "^0.7.15",
"lodash-es": "^4.17.21",
"semver": "^7.5.2",
"vscode-languageclient": "8.0.2-next.5",
"which": "^3.0.0"
}
}