forked from ziglang/vscode-zig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
435 lines (435 loc) · 14.2 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
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
{
"name": "vscode-zig",
"displayName": "Zig Language",
"description": "Language support for the Zig programming language",
"version": "0.5.1",
"publisher": "ziglang",
"icon": "images/zig-icon.png",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/ziglang/vscode-zig"
},
"engines": {
"vscode": "^1.68.0"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"onLanguage:zig",
"workspaceContains:*/build.zig",
"workspaceContains:*/build.zig.zon"
],
"main": "./out/extension",
"contributes": {
"configurationDefaults": {
"[zig]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ziglang.vscode-zig",
"files.eol": "\n"
}
},
"languages": [
{
"id": "zig",
"extensions": [
".zig",
".zon"
],
"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.initialSetupDone": {
"type": "boolean",
"default": false,
"description": "Has the initial setup been done yet?"
},
"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": {
"type": "string",
"default": null,
"description": "Set a custom path to the Zig binary. Empty string will lookup zig in PATH."
},
"zig.checkForUpdate": {
"scope": "resource",
"type": "boolean",
"description": "Whether to automatically check for new updates",
"default": true
},
"zig.revealOutputChannelOnFormattingError": {
"type": "boolean",
"default": true,
"description": "Should output channel be raised on formatting error."
},
"zig.astCheckProvider": {
"scope": "resource",
"type": "string",
"description": "Whether to enable ast-check diagnostics",
"enum": [
"off",
"extension",
"zls"
],
"enumItemLabels": [
"Off",
"Extension",
"Zig Language Server"
],
"enumDescriptions": [
"Disable ast-check diagnostics",
"Use extension ast-check diagnostics (fewer features)",
"Use ZLS ast-check diagnostics (includes code actions)"
],
"default": "zls"
},
"zig.formattingProvider": {
"scope": "resource",
"type": "string",
"description": "Whether to enable formatting (requires restarting editor)",
"enum": [
"off",
"extension",
"zls"
],
"enumItemLabels": [
"Off",
"Extension",
"Zig Language Server"
],
"enumDescriptions": [
"Disable formatting",
"Use extension formatting",
"Use ZLS formatting (not recommended as zls's formatting is slower)"
],
"default": "extension"
},
"zig.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.checkForUpdate": {
"scope": "resource",
"type": "boolean",
"description": "Whether to automatically check for new updates",
"default": true
},
"zig.zls.path": {
"scope": "resource",
"type": "string",
"description": "Path to `zls` executable. Example: `C:/zls/zig-cache/bin/zls.exe`.",
"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.enableAstCheckDiagnostics": {
"scope": "resource",
"type": "boolean",
"description": "Whether to enable ast-check diagnostics",
"default": true
},
"zig.zls.enableBuildOnSave": {
"scope": "resource",
"type": "boolean",
"description": "Whether to enable build-on-save diagnostics",
"default": false
},
"zig.zls.enableAutofix": {
"scope": "resource",
"type": "boolean",
"description": "Whether to automatically fix errors on save. Currently supports adding and removing discards.",
"default": false
},
"zig.zls.semanticTokens": {
"scope": "resource",
"type": "string",
"description": "Set level of semantic tokens. Partial only includes information that requires semantic analysis.",
"enum": [
"none",
"partial",
"full"
],
"default": "partial"
},
"zig.zls.enableInlayHints": {
"scope": "resource",
"type": "boolean",
"description": "Enables inlay hint support when the client also supports it",
"default": true
},
"zig.zls.inlayHintsShowVariableDeclaration": {
"scope": "resource",
"type": "boolean",
"description": "Enable inlay hints for variable declarations",
"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.dangerousComptimeExperimentsDoNotEnable": {
"scope": "resource",
"type": "boolean",
"description": "Whether to use the comptime interpreter",
"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": "Can be used in conjuction with `enable_ast_check_diagnostics` to favor using `zig ast-check` instead of ZLS's fork",
"default": true
},
"zig.zls.recordSession": {
"scope": "resource",
"type": "boolean",
"description": "When true, zls will record all request is receives and write in into `record_session_path`, so that they can replayed with `zls replay`",
"default": false
},
"zig.zls.recordSessionPath": {
"scope": "resource",
"type": "string",
"description": "Output file path when `record_session` is set. The recommended file extension *.zlsreplay",
"format": "path"
},
"zig.zls.replaySessionPath": {
"scope": "resource",
"type": "string",
"description": "Used when calling `zls replay` for specifying the replay file. If no extra argument is given `record_session_path` is used as the default path.",
"format": "path"
},
"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.buildRunnerGlobalCachePath": {
"scope": "resource",
"type": "string",
"description": "Path to a directory that will be used as the global cache path when executing a projects build.zig. null is equivalent to the path shown by `zig env`",
"format": "path"
},
"zig.zls.completionsWithReplace": {
"scope": "resource",
"type": "boolean",
"description": "Completions confirm behavior. If 'true', replace the text after the cursor",
"default": true
}
}
},
"commands": [
{
"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.update",
"title": "Check for Zig Updates",
"category": "Zig Setup"
},
{
"command": "zig.zls.install",
"title": "Install Server",
"category": "Zig Language Server"
},
{
"command": "zig.zls.startRestart",
"title": "Start / Restart Server",
"category": "Zig Language Server"
},
{
"command": "zig.zls.stop",
"title": "Stop Server",
"category": "Zig Language Server"
},
{
"command": "zig.zls.openconfig",
"title": "Open ZLS Config",
"category": "Zig Language Server"
},
{
"command": "zig.zls.update",
"title": "Check for Server Updates",
"category": "Zig Language Server"
}
],
"jsonValidation": [
{
"fileMatch": "zls.json",
"url": "https://raw.githubusercontent.com/zigtools/zls/master/schema.json"
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "esbuild --bundle --sourcemap=external --minify --external:vscode src/extension.ts --outdir=out --platform=node --format=cjs",
"watch": "esbuild --watch --bundle --sourcemap=external --external:vscode src/extension.ts --outdir=out --platform=node --format=cjs",
"test": "npm run compile && node ./node_modules/vscode/bin/test",
"lint": "eslint . --ext .ts"
},
"devDependencies": {
"@types/mocha": "^2.2.48",
"@types/node": "^18.0.0",
"@types/vscode": "^1.68.0",
"@types/which": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"eslint": "^8.49.0",
"vscode-test": "^1.4.0"
},
"dependencies": {
"@vscode/vsce": "^2.19.0",
"axios": "^1.6.0",
"camelcase": "^7.0.1",
"esbuild": "^0.12.1",
"lodash-es": "^4.17.21",
"lodash.debounce": "^4.0.8",
"mkdirp": "^2.1.3",
"semver": "^7.5.2",
"vscode-languageclient": "8.0.2-next.5",
"which": "^3.0.0"
}
}