forked from leanprover/vscode-lean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
486 lines (486 loc) · 14.4 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
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
{
"name": "lean",
"displayName": "lean",
"description": "Lean 3 language support for VS Code",
"version": "0.16.55",
"publisher": "jroesch",
"engines": {
"vscode": "^1.38.0"
},
"categories": [
"Programming Languages"
],
"repository": {
"type": "git",
"url": "https://github.com/leanprover/vscode-lean.git"
},
"contributes": {
"configuration": {
"type": "object",
"title": "Lean",
"properties": {
"lean.executablePath": {
"type": "string",
"default": "lean",
"markdownDescription": "Path to the Lean executable to use. **DO NOT CHANGE** from the default `lean` unless you know what you're doing!"
},
"lean.suggestionURL": {
"type": "string",
"default": "",
"markdownDescription": "URL to contact for model suggestions"
},
"lean.suggestionAPIKey": {
"type": "string",
"default": "",
"markdownDescription": "API Key to use for suggestions"
},
"lean.leanpkgPath": {
"type": "string",
"default": "leanpkg",
"markdownDescription": "Path to the leanpkg executable to use. **DO NOT CHANGE** from the default `leanpkg` unless you know what you're doing!"
},
"lean.memoryLimit": {
"type": "number",
"default": 4096,
"markdownDescription": "Set a memory limit (in megabytes) for the Lean server."
},
"lean.timeLimit": {
"type": "number",
"default": 100000,
"markdownDescription": "Set a deterministic timeout (it is approximately the maximum number of memory allocations in thousands) for the Lean server."
},
"lean.extraOptions": {
"type": "array",
"default": [],
"markdownDescription": "Extra command-line options for the Lean server.",
"items": {
"type": "string",
"description": "a single command-line argument"
}
},
"lean.progressMessages": {
"type": "boolean",
"default": false,
"markdownDescription": "Show error messages where Lean is still checking."
},
"lean.roiModeDefault": {
"type": "string",
"default": "visible",
"markdownDescription": "Set the default region of interest mode (nothing, visible, lines, linesAndAbove, open, or project) for the Lean extension."
},
"lean.input.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Enable Lean input mode."
},
"lean.input.customTranslations": {
"type": "object",
"items": {
"type": "string",
"description": "Unicode character to translate to"
},
"default": {},
"markdownDescription": "Add additional input Unicode translations. Example: `{\"foo\": \"☺\"}` will correct `\\foo` to `☺`."
},
"lean.input.languages": {
"type": "array",
"default": [
"lean"
],
"markdownDescription": "Enable Lean Unicode input in other file types.",
"items": {
"type": "string",
"description": "the name of a language, e.g. 'lean', 'markdown'"
}
},
"lean.input.leader": {
"type": "string",
"default": "\\",
"markdownDescription": "Leader key to trigger input mode."
},
"lean.input.eagerReplacementEnabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Enable eager replacement of abbreviations that uniquely identify a symbol."
},
"lean.infoViewAllErrorsOnLine": {
"type": "boolean",
"default": false,
"markdownDescription": "Info view: show all errors on the current line, instead of just the ones on the right of the cursor."
},
"lean.infoViewAutoOpen": {
"type": "boolean",
"default": true,
"markdownDescription": "Info view: open info view when Lean extension is activated."
},
"lean.infoViewAutoOpenShowGoal": {
"type": "boolean",
"default": true,
"markdownDescription": "Info view: auto open shows goal and messages for the current line (instead of all messages for the whole file)"
},
"lean.infoViewStyle": {
"type": "string",
"default": "",
"markdownDescription": "Add an additional CSS snippet to the info view."
},
"lean.infoViewTacticStateFilters": {
"type": "array",
"default": [
{
"regex": "^_",
"match": false,
"flags": ""
},
{
"name": "goals only",
"regex": "^(⊢|\\d+ goals|case|$)",
"match": true,
"flags": ""
}
],
"markdownDescription": "An array of objects containing regular expression strings that can be used to filter (positively or negatively) the tactic state in the info view. Set to an empty array `[]` to hide the filter select dropdown.\n \n Each object must contain the following keys: 'regex': string, 'match': boolean, 'flags': string.\n 'regex' is a properly-escaped regex string,\n 'match' = true (false) means blocks in the tactic state matching 'regex' will be included (excluded) in the info view, \n 'flags' are additional flags passed to the JavaScript `RegExp` constructor.\n The 'name' key is optional and may contain a string that is displayed in the dropdown instead of the full regex details.",
"items": {
"type": "object",
"description": "an object with required properties 'regex': string, 'match': boolean, and 'flags': string, and optional property 'name': string",
"properties": {
"name": {
"type": "string",
"description": "name displayed in the dropdown"
},
"regex": {
"type": "string",
"description": "a properly-escaped regex string, e.g. '^_' matches any string beginning with an underscore"
},
"match": {
"type": "boolean",
"description": "whether tactic state lines matching the value of 'regex' should be included (true) or excluded (false)"
},
"flags": {
"type": "string",
"description": "additional flags passed to the RegExp constructor, e.g. 'i' for ignore case"
}
},
"required": [
"regex",
"match",
"flags"
]
}
},
"lean.infoViewFilterIndex": {
"type": "number",
"default": -1,
"markdownDescription": "Index of the filter applied to the tactic state (in the array infoViewTacticStateFilters). An index of -1 means no filter is applied."
},
"lean.typeInStatusBar": {
"type": "boolean",
"default": true,
"markdownDescription": "Show the type of term under the cursor in the status bar."
},
"lean.typesInCompletionList": {
"type": "boolean",
"default": false,
"markdownDescription": "Display types of all items in the list of completions. By default, only the type of the highlighted item is shown."
}
}
},
"commands": [
{
"command": "lean.restartServer",
"category": "Lean",
"title": "Restart",
"description": "Restart the Language Server."
},
{
"command": "lean.pasteTacticSuggestion",
"category": "Lean",
"title": "Paste Tactic Suggestion",
"description": "Pastes a suggestion provided by a tactic (e.g. from squeeze_simp)"
},
{
"command": "lean.input.convert",
"category": "Lean",
"title": "Input: Convert Current Abbreviation",
"description": "Converts the current abbreviation (e.g. \\lam)."
},
{
"command": "lean.displayGoal",
"category": "Lean",
"title": "Info View: Display Goal",
"description": "Display the goal and any messages at the current position in the info view.",
"icon": {
"dark": "./media/display-goal-dark.svg",
"light": "./media/display-goal-light.svg"
}
},
{
"command": "lean.displayList",
"category": "Lean",
"title": "Info View: Toggle \"All Messages\"",
"description": "Toggles the \"All Messages\" widget in the info view."
},
{
"command": "lean.openDocView",
"category": "Lean",
"title": "Open Documentation View",
"description": "Open documentation panel"
},
{
"command": "lean.infoView.copyToComment",
"category": "Lean",
"title": "Info View: Copy Contents to Comment",
"description": "Copy the contents of the currently active tactic state widget to a new comment on the previous line.",
"icon": {
"dark": "./media/copy-to-comment-dark.svg",
"light": "./media/copy-to-comment-light.svg"
}
},
{
"command": "lean.infoView.toggleStickyPosition",
"category": "Lean",
"title": "Info View: Toggle Pin",
"description": "Create or remove a tactic state widget pinned to show the goal at the current position.",
"icon": {
"dark": "./media/toggle-sticky-position-dark.svg",
"light": "./media/toggle-sticky-position-light.svg"
}
},
{
"command": "lean.infoView.toggleUpdating",
"category": "Lean",
"title": "Info View: Toggle Updating",
"description": "Pause / Continue live updating of the main tactic state widget."
},
{
"command": "lean.roiMode.select",
"category": "Lean",
"title": "Select Region-of-interest",
"description": "Select files to be checked by the Lean server."
},
{
"command": "lean.roiMode.nothing",
"category": "Lean",
"title": "Check Nothing",
"description": "Disable automatic checking of Lean code."
},
{
"command": "lean.roiMode.visibleFiles",
"category": "Lean",
"title": "Check Visible Files",
"description": "Automatically check all files that are visible."
},
{
"command": "lean.roiMode.linesAndAbove",
"category": "Lean",
"title": "Check visible lines and above",
"description": "Automatically check all visible lines and lines above them."
},
{
"command": "lean.roiMode.openFiles",
"category": "Lean",
"title": "Check Open Files",
"description": "Automatically check all opened files."
},
{
"command": "lean.roiMode.projectFiles",
"category": "Lean",
"title": "Check Project Files",
"description": "Automatically check all files in the workspace."
},
{
"command": "lean.batchExecute",
"category": "Lean",
"title": "Batch Execute File",
"description": "Execute the current file using Lean."
}
],
"languages": [
{
"id": "lean",
"aliases": [
"Lean",
"lean"
],
"extensions": [
".lean"
],
"configuration": "./language-configuration.json"
},
{
"id": "leanmarkdown",
"aliases": [],
"extensions": [
".leanmarkdown"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "lean",
"scopeName": "source.lean",
"path": "./syntaxes/lean.json"
},
{
"language": "leanmarkdown",
"scopeName": "source.lean.markdown",
"path": "./syntaxes/lean-markdown.json"
},
{
"scopeName": "markdown.lean.codeblock",
"path": "./syntaxes/codeblock.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.lean": "lean"
}
}
],
"keybindings": [
{
"command": "lean.displayGoal",
"key": "ctrl+shift+enter",
"mac": "cmd+shift+enter",
"when": "editorTextFocus && editorLangId == lean"
},
{
"command": "lean.displayList",
"key": "ctrl+shift+alt+enter",
"mac": "cmd+shift+alt+enter",
"when": "editorTextFocus && editorLangId == lean"
},
{
"command": "lean.input.convert",
"key": "tab",
"mac": "tab",
"when": "editorTextFocus && editorLangId == lean && lean.input.isActive"
},
{
"command": "lean.batchExecute",
"key": "ctrl+shift+r",
"mac": "cmd+shift+r",
"when": "editorTextFocus && editorLangId == lean"
},
{
"command": "lean.pasteTacticSuggestion",
"key": "alt+v",
"mac": "alt+v",
"when": "editorTextFocus && editorLangId == lean"
}
],
"menus": {
"commandPalette": [
{
"command": "lean.displayGoal",
"when": "editorLangId == lean"
},
{
"command": "lean.input.convert",
"when": "editorLangId == lean && lean.input.isActive"
},
{
"command": "lean.batchExecute",
"when": "editorLangId == lean"
},
{
"command": "lean.infoView.copyToComment",
"when": "editorLangId == lean"
},
{
"command": "lean.infoView.toggleStickyPosition",
"when": "editorLangId == lean"
},
{
"command": "lean.infoView.toggleUpdating",
"when": "editorLangId == lean || infoViewFocused"
}
],
"editor/title": [
{
"command": "lean.displayGoal",
"when": "editorLangId == lean",
"group": "navigation@2"
}
]
},
"configurationDefaults": {
"[lean]": {
"editor.unicodeHighlight.ambiguousCharacters": false,
"editor.tabSize": 2
}
}
},
"activationEvents": [
"onLanguage:lean",
"onLanguage:markdown",
"onCommand:lean.restartSever",
"onCommand:lean.infoDocument.toggleMode",
"onCommand:lean.roiMode.select",
"onCommand:lean.roiMode.nothing",
"onCommand:lean.roiMode.cursor",
"onCommand:lean.roiMode.visibleFiles",
"onCommand:lean.roiMode.openFiles",
"onCommand:lean.roiMode.projectFiles"
],
"main": "./out/extension",
"scripts": {
"vscode:prepublish": "webpack --env production",
"compile": "webpack --env development",
"watch": "webpack --env development --watch",
"lint": "eslint -c ./.eslintrc.js ./src/**/*.ts ./infoview/**/*.tsx",
"package": "vsce package"
},
"dependencies": {
"axios": "^0.21.1",
"carrier": "0.3.0",
"cheerio": "1.0.0-rc.9",
"express": "^4.17.1",
"hasbin": "^1.2.3",
"katex": "^0.13.11",
"lean-client-js-core": "^3.3.1",
"lean-client-js-node": "^3.3.1",
"load-json-file": "6.2.0",
"mobx": "5.15.7",
"prop-types": "^15.7.2",
"react-katex": "^2.0.2",
"semver": "^7.3.5",
"username": "^5.1.0"
},
"devDependencies": {
"@popperjs/core": "^2.9.2",
"@types/cheerio": "^0.22.29",
"@types/express": "^4.17.12",
"@types/load-json-file": "^5.1.0",
"@types/mocha": "^8.2.2",
"@types/node": "^15.6.1",
"@types/react": "^17.0.8",
"@types/react-dom": "^17.0.5",
"@types/semver": "^7.3.6",
"@types/username": "^5.0.0",
"@types/vscode": "^1.38.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"css-loader": "^5.2.6",
"eslint": "^7.27.0",
"ovsx": "0.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-popper": "^2.2.5",
"style-loader": "^2.0.0",
"svg-loader": "0.0.2",
"ts-loader": "^9.2.2",
"typescript": "^4.3.2",
"url-loader": "^4.1.1",
"vsce": "^1.91.0",
"webpack": "^5.38.1",
"webpack-cli": "^4.7.0"
},
"icon": "images/lean_logo.png",
"license": "Apache-2.0",
"__metadata": {
"id": "e5e5c0e2-0fb3-4f00-9c79-5b15f9ff8430",
"publisherDisplayName": "jroesch",
"publisherId": "7875b14e-7883-4853-ac79-bfe9296fab82"
}
}