forked from nwolverson/vscode-ide-purescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
371 lines (371 loc) · 16.7 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
{
"name": "ide-purescript",
"displayName": "PureScript IDE",
"description": "PureScript IntelliSense, tooltip, errors, code actions with language-server-purescript/purs IDE server",
"version": "0.26.3",
"publisher": "nwolverson",
"author": {
"name": "Nicholas Wolverson"
},
"repository": {
"type": "git",
"url": "https://github.com/nwolverson/vscode-ide-purescript.git"
},
"bugs": {
"url": "https://github.com/nwolverson/vscode-ide-purescript/issues"
},
"icon": "images/ps_avatar2.png",
"homepage": "https://github.com/nwolverson/vscode-ide-purescript",
"license": "MIT",
"engines": {
"vscode": "^1.63.0"
},
"categories": [
"Other"
],
"keywords": [
"purescript",
"purs"
],
"activationEvents": [
"onLanguage:purescript",
"workspaceContains:src/**/*.purs",
"workspaceContains:spago.dhall"
],
"main": "./dist/client.js",
"contributes": {
"commands": [
{
"command": "purescript.build",
"title": "PureScript: Build"
},
{
"command": "purescript.clean",
"title": "PureScript: Clean"
},
{
"command": "purescript.addImport",
"title": "PureScript: Add Import"
},
{
"command": "purescript.addExplicitImport",
"title": "PureScript: Add Explicit Import"
},
{
"command": "purescript.caseSplit",
"title": "PureScript: Case Split"
},
{
"command": "purescript.addClause",
"title": "PureScript: Add Clause"
},
{
"command": "purescript.restartPscIde",
"title": "PureScript: Restart/Reconnect purs IDE server"
},
{
"command": "purescript.startPscIde",
"title": "PureScript: Start/Connect purs IDE server"
},
{
"command": "purescript.stopPscIde",
"title": "PureScript: Stop/Disconnect purs IDE server"
},
{
"command": "purescript.searchPursuit",
"title": "PureScript: Search Pursuit"
},
{
"command": "purescript.searchPursuitModules",
"title": "PureScript: Search Pursuit Modules"
}
],
"codeActions": [
{
"languages": [
"purescript"
],
"actions": [
{
"kind": "source.organizeImports",
"title": "Organize Imports",
"description": "Reformat imports according to compiler formatting"
}
]
}
],
"configuration": {
"title": "PureScript",
"properties": {
"purescript.pursExe": {
"type": "string",
"default": "purs",
"description": "Location of purs executable (resolved wrt PATH)",
"scope": "resource"
},
"purescript.pscIdePort": {
"type": [
"integer",
"null"
],
"description": "Port to use for purs IDE server (whether an existing server or to start a new one). By default a random port is chosen (or an existing port in .psc-ide-port if present), if this is specified no attempt will be made to select an alternative port on failure.",
"default": null,
"scope": "resource"
},
"purescript.autoStartPscIde": {
"type": "boolean",
"default": true,
"description": "Whether to automatically start/connect to purs IDE server when editing a PureScript file (includes connecting to an existing running instance). If this is disabled, various features like autocomplete, tooltips, and other type info will not work until start command is run manually.",
"scope": "resource"
},
"purescript.packagePath": {
"type": "string",
"default": "",
"description": "Path to installed packages. Will be used to control globs passed to IDE server for source locations. Change requires IDE server restart.",
"scope": "resource"
},
"purescript.addPscPackageSources": {
"type": "boolean",
"default": false,
"description": "Whether to add psc-package sources to the globs passed to the IDE server for source locations (specifically the output of `psc-package sources`, if this is a psc-package project). Update due to adding packages/changing package set requires psc-ide server restart.",
"scope": "resource"
},
"purescript.addSpagoSources": {
"type": "boolean",
"default": true,
"description": "Whether to add spago sources to the globs passed to the IDE server for source locations (specifically the output of `spago sources`, if this is a spago project). Update due to adding packages/changing package set requires psc-ide server restart.",
"scope": "resource"
},
"purescript.sourcePath": {
"type": "string",
"default": "src",
"description": "Path to application source root. Will be used to control globs passed to IDE server for source locations. Change requires IDE server restart.",
"scope": "resource"
},
"purescript.buildCommand": {
"type": "string",
"default": "spago build --purs-args --json-errors",
"description": "Build command to use with arguments. Not passed to shell. eg `spago build --purs-args --json-errors`",
"scope": "resource"
},
"purescript.fastRebuild": {
"type": "boolean",
"default": true,
"description": "Enable purs IDE server fast rebuild (rebuilding single files on saving them)",
"scope": "resource"
},
"purescript.buildOpenedFiles": {
"type": "boolean",
"default": false,
"markdownDescription": "**EXPERIMENTAL** Enable purs IDE server fast rebuild of opened files. This includes both newly opened tabs and those present at startup.",
"scope": "resource"
},
"purescript.censorWarnings": {
"title": "Censor warnings",
"description": "The warning codes to censor, both for fast rebuild and a full build. Unrelated to any psa setup. e.g.: [\"ShadowedName\",\"MissingTypeDeclaration\"]",
"type": "array",
"default": [],
"items": {
"type": "string"
},
"scope": "resource"
},
"purescript.autocompleteAllModules": {
"type": "boolean",
"default": true,
"description": "Whether to always autocomplete from all built modules, or just those imported in the file. Suggestions from all modules always available by explicitly triggering autocomplete.",
"scope": "resource"
},
"purescript.autocompleteAddImport": {
"type": "boolean",
"default": true,
"description": "Whether to automatically add imported identifiers when accepting autocomplete result.",
"scope": "resource"
},
"purescript.autocompleteLimit": {
"type": [
"null",
"integer"
],
"default": null,
"description": "Maximum number of results to fetch for an autocompletion request. May improve performance on large projects.",
"scope": "resource"
},
"purescript.autocompleteGrouped": {
"type": "boolean",
"default": true,
"description": "Whether to group completions in autocomplete results. Requires compiler 0.11.6",
"scope": "resource"
},
"purescript.importsPreferredModules": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"Prelude"
],
"description": "Module to prefer to insert when adding imports which have been re-exported. In order of preference, most preferred first.",
"scope": "resource"
},
"purescript.preludeModule": {
"type": "string",
"default": "Prelude",
"description": "Module to consider as your default prelude, if an auto-complete suggestion comes from this module it will be imported unqualified.",
"scope": "resource"
},
"purescript.addNpmPath": {
"type": "boolean",
"default": false,
"description": "Whether to add the local npm bin directory to the PATH for purs IDE server and build command.",
"scope": "resource"
},
"purescript.fullBuildOnSave": {
"type": "boolean",
"default": false,
"description": "Whether to perform a full build on save with the configured build command (rather than IDE server fast rebuild). This is not generally recommended because it is slow, but it does mean that dependent modules are rebuilt as necessary.",
"scope": "resource"
},
"purescript.fullBuildOnSaveProgress": {
"type": "boolean",
"default": true,
"description": "Whether to show progress for full build on save (if enabled)",
"scope": "resource"
},
"purescript.pscIdelogLevel": {
"type": "string",
"default": "",
"description": "Log level for purs IDE server",
"scope": "resource"
},
"purescript.outputDirectory": {
"type": "string",
"default": "output/",
"description": "Override purs ide output directory (output/ if not specified). This should match up to your build command",
"scope": "resource"
},
"purescript.trace.server": {
"scope": "window",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VSCode and the PureScript language service."
},
"purescript.codegenTargets": {
"scope": "resource",
"type": "array",
"default": null,
"items": {
"type": "string"
},
"description": "List of codegen targets to pass to the compiler for rebuild. e.g. js, corefn. If not specified (rather than empty array) this will not be passed and the compiler will default to js. Requires 0.12.1+"
},
"purescript.foreignExt": {
"scope": "resource",
"type": "string",
"default": "js",
"description": "Extension for foreign files"
},
"purescript.diagnosticsOnType": {
"scope": "resource",
"type": "boolean",
"default": false,
"description": "**EXPERIMENTAL** Enable rebuilding modules for diagnostics automatically on typing. This may provide quicker feedback on errors, but could interfere with other functionality."
},
"purescript.diagnosticsOnTypeDebounce": {
"scope": "resource",
"type": "integer",
"default": 100,
"description": "**EXPERIMENTAL**"
},
"purescript.diagnosticsOnOpen": {
"scope": "resource",
"type": "boolean",
"default": false,
"description": "**EXPERIMENTAL** Enable diagnostics on file open, as per diagnostics on type"
},
"purescript.formatter": {
"scope": "resource",
"type": "string",
"enum": [
"none",
"purty",
"purs-tidy",
"pose"
],
"markdownEnumDescriptions": [
"No formatting provision",
"Use purty. Must be installed - [instructions](https://gitlab.com/joneshf/purty#npm)",
"Use purs-tidy. Must be installed - [instructions](https://github.com/natefaubion/purescript-tidy)",
"Use pose (prettier plugin). Must be installed - [instructions](https://pose.rowtype.yoga/)"
],
"default": "purs-tidy",
"description": "Tool to use to for formatting. Must be installed and on PATH (or npm installed with addNpmPath set)"
},
"purescript.declarationTypeCodeLens": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enable declaration codelens to add types to declarations"
},
"purescript.exportsCodeLens": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enable declaration codelenses for export management"
}
}
},
"keybindings": [
{
"command": "purescript.build",
"key": "shift+ctrl+b",
"mac": "shift+cmd+b",
"when": "editorTextFocus && editorLangId == 'purescript'"
}
],
"breakpoints": [
{
"language": "purescript"
}
]
},
"scripts": {
"vscode:prepublish": "run-s prep tsc:* purs:* \"bundle:* -- --minify\"",
"build": "run-s prep tsc:* purs:* \"bundle:* -- --sourcemap\"",
"dev": "run-s prep tsc:* purs:* 'bundle:client -- --sourcemap'",
"prep": "mkdirp out/src dist",
"tsc:ffi": "tsc -p src/VSCode/",
"tsc:extension": "tsc -p ./",
"purs:build": "spago build",
"bundle:client": "esbuild out/src/extension.js --bundle --outfile=dist/client.js --external:vscode --format=cjs --platform=node",
"bundle:server": "esbuild purescript-language-server --bundle --outfile=dist/server.js --format=cjs --platform=node",
"test": "jest",
"link_server": "rm -f dist/server.js && cd dist && ln -s ../../purescript-language-server/server.js server.js"
},
"extensionDependencies": [
"nwolverson.language-purescript"
],
"devDependencies": {
"@types/jest": "^27.4.0",
"@types/node": "^17.0.17",
"@types/vscode": "^1.63.0",
"esbuild": "^0.14.21",
"jest": "^27.5.1",
"mkdirp": "^1.0.4",
"npm-run-all": "^4.1.5",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5"
},
"dependencies": {
"purescript-language-server": "^0.17.3",
"striptags": "^3.2.0",
"vscode-languageclient": "^8.0.0-next.12",
"vscode-uri": "^3.0.3",
"xhr2": "^0.2.1"
}
}