]> git.lizzy.rs Git - rust.git/blob - editors/code/package.json
43db61a8bc0f82337d406e4e585086c081a8a085
[rust.git] / editors / code / package.json
1 {
2     "name": "ra-lsp",
3     "displayName": "ra-lsp",
4     "description": "An alternative rust language server to the RLS",
5     "preview": true,
6     "private": true,
7     "version": "0.0.1",
8     "publisher": "matklad",
9     "repository": {
10         "url": "https://github.com/matklad/rust-analyzer/"
11     },
12     "categories": [
13         "Other"
14     ],
15     "engines": {
16         "vscode": "^1.40.0"
17     },
18     "scripts": {
19         "vscode:prepublish": "npm run compile",
20         "package": "vsce package",
21         "compile": "rollup -c && shx cp src/utils/terminateProcess.sh bundle/terminateProcess.sh",
22         "watch": "tsc -watch -p ./",
23         "fix": "prettier **/*.{json,ts} --write && tslint --project . --fix",
24         "lint": "tslint --project .",
25         "prettier": "prettier **/*.{json,ts}",
26         "test": "tsc -p . && node ./out/test/runTest.js",
27         "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --write && git diff --exit-code"
28     },
29     "prettier": {
30         "singleQuote": true,
31         "tabWidth": 4,
32         "trailingComma": "all"
33     },
34     "dependencies": {
35         "lookpath": "^1.0.3",
36         "seedrandom": "^3.0.5",
37         "vscode-languageclient": "^6.0.0-next.8"
38     },
39     "devDependencies": {
40         "@types/glob": "^7.1.1",
41         "@types/mocha": "^5.2.7",
42         "@types/node": "^10.17.6",
43         "@types/seedrandom": "^2.4.28",
44         "@types/vscode": "^1.40.0",
45         "glob": "^7.1.6",
46         "mocha": "^6.2.2",
47         "prettier": "^1.19.1",
48         "rollup": "^1.27.9",
49         "rollup-plugin-commonjs": "^10.1.0",
50         "rollup-plugin-node-resolve": "^5.2.0",
51         "rollup-plugin-typescript": "^1.0.1",
52         "rollup-plugin-sourcemaps": "^0.4.2",
53         "shx": "^0.3.1",
54         "tslint": "^5.20.1",
55         "tslint-config-prettier": "^1.18.0",
56         "typescript": "^3.7.3",
57         "vsce": "^1.70.0",
58         "vscode-test": "^1.2.3"
59     },
60     "activationEvents": [
61         "onLanguage:rust",
62         "onCommand:rust-analyzer.analyzerStatus",
63         "onCommand:rust-analyzer.collectGarbage",
64         "workspaceContains:**/Cargo.toml"
65     ],
66     "main": "./bundle/extension",
67     "contributes": {
68         "taskDefinitions": [
69             {
70                 "type": "cargo",
71                 "required": [
72                     "command"
73                 ],
74                 "properties": {
75                     "label": {
76                         "type": "string"
77                     },
78                     "command": {
79                         "type": "string"
80                     },
81                     "args": {
82                         "type": "array"
83                     },
84                     "env": {
85                         "type": "object"
86                     }
87                 }
88             }
89         ],
90         "commands": [
91             {
92                 "command": "rust-analyzer.syntaxTree",
93                 "title": "Show Syntax Tree",
94                 "category": "Rust Analyzer"
95             },
96             {
97                 "command": "rust-analyzer.expandMacro",
98                 "title": "Expand macro recursively",
99                 "category": "Rust Analyzer"
100             },
101             {
102                 "command": "rust-analyzer.matchingBrace",
103                 "title": "Find matching brace",
104                 "category": "Rust Analyzer"
105             },
106             {
107                 "command": "rust-analyzer.parentModule",
108                 "title": "Locate parent module",
109                 "category": "Rust Analyzer"
110             },
111             {
112                 "command": "rust-analyzer.joinLines",
113                 "title": "Join lines",
114                 "category": "Rust Analyzer"
115             },
116             {
117                 "command": "rust-analyzer.run",
118                 "title": "Run",
119                 "category": "Rust Analyzer"
120             },
121             {
122                 "command": "rust-analyzer.analyzerStatus",
123                 "title": "Status",
124                 "category": "Rust Analyzer"
125             },
126             {
127                 "command": "rust-analyzer.collectGarbage",
128                 "title": "Run garbage collection",
129                 "category": "Rust Analyzer"
130             },
131             {
132                 "command": "rust-analyzer.reload",
133                 "title": "Restart server",
134                 "category": "Rust Analyzer"
135             },
136             {
137                 "command": "rust-analyzer.startCargoWatch",
138                 "title": "Start Cargo Watch",
139                 "category": "Rust Analyzer"
140             },
141             {
142                 "command": "rust-analyzer.stopCargoWatch",
143                 "title": "Stop Cargo Watch",
144                 "category": "Rust Analyzer"
145             }
146         ],
147         "keybindings": [
148             {
149                 "command": "rust-analyzer.parentModule",
150                 "key": "ctrl+u",
151                 "when": "editorTextFocus && editorLangId == rust"
152             },
153             {
154                 "command": "rust-analyzer.matchingBrace",
155                 "key": "ctrl+shift+m",
156                 "when": "editorTextFocus && editorLangId == rust"
157             },
158             {
159                 "command": "rust-analyzer.joinLines",
160                 "key": "ctrl+shift+j",
161                 "when": "editorTextFocus && editorLangId == rust"
162             },
163             {
164                 "command": "rust-analyzer.run",
165                 "key": "ctrl+r",
166                 "when": "editorTextFocus && editorLangId == rust"
167             }
168         ],
169         "configuration": {
170             "type": "object",
171             "title": "Rust Analyzer",
172             "properties": {
173                 "rust-analyzer.highlightingOn": {
174                     "type": "boolean",
175                     "default": false,
176                     "description": "Highlight Rust code (overrides built-in syntax highlighting)"
177                 },
178                 "rust-analyzer.rainbowHighlightingOn": {
179                     "type": "boolean",
180                     "default": false,
181                     "description": "When highlighting Rust code, use a unique color per identifier"
182                 },
183                 "rust-analyzer.featureFlags": {
184                     "type": "object",
185                     "default": {},
186                     "description": "Fine grained feature flags to disable annoying features"
187                 },
188                 "rust-analyzer.enableEnhancedTyping": {
189                     "type": "boolean",
190                     "default": true,
191                     "description": "Enables enhanced typing. NOTE: If using a VIM extension, you should set this to false"
192                 },
193                 "rust-analyzer.raLspServerPath": {
194                     "type": [
195                         "string"
196                     ],
197                     "default": "ra_lsp_server",
198                     "description": "Path to ra_lsp_server executable"
199                 },
200                 "rust-analyzer.enableCargoWatchOnStartup": {
201                     "type": "string",
202                     "default": "ask",
203                     "enum": [
204                         "ask",
205                         "enabled",
206                         "disabled"
207                     ],
208                     "enumDescriptions": [
209                         "Asks each time whether to run `cargo watch`",
210                         "`cargo watch` is always started",
211                         "Don't start `cargo watch`"
212                     ],
213                     "description": "Whether to run `cargo watch` on startup"
214                 },
215                 "rust-analyzer.excludeGlobs": {
216                     "type": "array",
217                     "default": [],
218                     "description": "Paths to exclude from analysis"
219                 },
220                 "rust-analyzer.useClientWatching": {
221                     "type": "boolean",
222                     "default": false,
223                     "description": "client provided file watching instead of notify watching."
224                 },
225                 "rust-analyzer.cargo-watch.arguments": {
226                     "type": "string",
227                     "description": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )",
228                     "default": ""
229                 },
230                 "rust-analyzer.cargo-watch.command": {
231                     "type": "string",
232                     "description": "`cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )",
233                     "default": "check"
234                 },
235                 "rust-analyzer.cargo-watch.ignore": {
236                     "type": "array",
237                     "description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)",
238                     "default": []
239                 },
240                 "rust-analyzer.trace.server": {
241                     "type": "string",
242                     "scope": "window",
243                     "enum": [
244                         "off",
245                         "messages",
246                         "verbose"
247                     ],
248                     "enumDescriptions": [
249                         "No traces",
250                         "Error only",
251                         "Full log"
252                     ],
253                     "default": "off",
254                     "description": "Trace requests to the ra_lsp_server"
255                 },
256                 "rust-analyzer.trace.cargo-watch": {
257                     "type": "string",
258                     "scope": "window",
259                     "enum": [
260                         "off",
261                         "error",
262                         "verbose"
263                     ],
264                     "default": "off",
265                     "description": "Trace output of cargo-watch"
266                 },
267                 "rust-analyzer.lruCapacity": {
268                     "type": "number",
269                     "default": null,
270                     "description": "Number of syntax trees rust-analyzer keeps in memory"
271                 },
272                 "rust-analyzer.displayInlayHints": {
273                     "type": "boolean",
274                     "default": true,
275                     "description": "Display additional type information in the editor"
276                 },
277                 "rust-analyzer.maxInlayHintLength": {
278                     "type": "number",
279                     "default": 20,
280                     "description": "Maximum length for inlay hints"
281                 },
282                 "rust-analyzer.cargoFeatures.noDefaultFeatures": {
283                     "type": "boolean",
284                     "default": false,
285                     "description": "Do not activate the `default` feature"
286                 },
287                 "rust-analyzer.cargoFeatures.allFeatures": {
288                     "type": "boolean",
289                     "default": true,
290                     "description": "Activate all available features"
291                 },
292                 "rust-analyzer.cargoFeatures.features": {
293                     "type": "array",
294                     "default": [],
295                     "description": "List of features to activate"
296                 }
297             }
298         },
299         "problemPatterns": [
300             {
301                 "name": "rustc",
302                 "patterns": [
303                     {
304                         "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
305                         "severity": 1,
306                         "code": 2,
307                         "message": 3
308                     },
309                     {
310                         "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
311                         "file": 1,
312                         "line": 2,
313                         "column": 3
314                     }
315                 ]
316             }
317         ],
318         "problemMatchers": [
319             {
320                 "name": "rustc",
321                 "fileLocation": [
322                     "relative",
323                     "${workspaceRoot}"
324                 ],
325                 "pattern": "$rustc"
326             },
327             {
328                 "name": "rustc-watch",
329                 "fileLocation": [
330                     "relative",
331                     "${workspaceRoot}"
332                 ],
333                 "background": {
334                     "beginsPattern": "^\\[Running\\b",
335                     "endsPattern": "^\\[Finished running\\b"
336                 },
337                 "pattern": "$rustc"
338             }
339         ],
340         "colors": [
341             {
342                 "id": "ralsp.comment",
343                 "description": "Color for comments",
344                 "defaults": {
345                     "dark": "#6A9955",
346                     "light": "#008000",
347                     "highContrast": "#7CA668"
348                 }
349             },
350             {
351                 "id": "ralsp.string",
352                 "description": "Color for strings",
353                 "defaults": {
354                     "dark": "#CE9178",
355                     "light": "#A31515",
356                     "highContrast": "#CE9178"
357                 }
358             },
359             {
360                 "id": "ralsp.keyword",
361                 "description": "Color for keywords",
362                 "defaults": {
363                     "dark": "#569cd6",
364                     "light": "#0000FF",
365                     "highContrast": "#569CD6"
366                 }
367             },
368             {
369                 "id": "ralsp.keyword.control",
370                 "description": "Color for control keywords",
371                 "defaults": {
372                     "dark": "#C586C0",
373                     "light": "#AF00DB",
374                     "highContrast": "#C586C0"
375                 }
376             },
377             {
378                 "id": "ralsp.keyword.unsafe",
379                 "description": "Color for unsafe",
380                 "defaults": {
381                     "dark": "#FF3030",
382                     "light": "#FF1010",
383                     "highContrast": "#FF1010"
384                 }
385             },
386             {
387                 "id": "ralsp.function",
388                 "description": "Color for functions",
389                 "defaults": {
390                     "dark": "#DCDCAA",
391                     "light": "#795E26",
392                     "highContrast": "#DCDCAA"
393                 }
394             },
395             {
396                 "id": "ralsp.parameter",
397                 "description": "Color for parameters",
398                 "defaults": {
399                     "dark": "#9CDCFE",
400                     "light": "#001080",
401                     "highContrast": "#9CDCFE"
402                 }
403             },
404             {
405                 "id": "ralsp.builtin",
406                 "description": "Color for builtins",
407                 "defaults": {
408                     "dark": "#DD6718",
409                     "light": "#DD6718",
410                     "highContrast": "#DD6718"
411                 }
412             },
413             {
414                 "id": "ralsp.text",
415                 "description": "Color for text",
416                 "defaults": {
417                     "dark": "#D4D4D4",
418                     "light": "#000000",
419                     "highContrast": "#FFFFFF"
420                 }
421             },
422             {
423                 "id": "ralsp.attribute",
424                 "description": "Color for attributes",
425                 "defaults": {
426                     "dark": "#9FE9BF",
427                     "light": "#1F4B1F",
428                     "highContrast": "#108010"
429                 }
430             },
431             {
432                 "id": "ralsp.literal",
433                 "description": "Color for literals",
434                 "defaults": {
435                     "dark": "#BECEA8",
436                     "light": "#09885A",
437                     "highContrast": "#B5CEA8"
438                 }
439             },
440             {
441                 "id": "ralsp.literal.numeric",
442                 "description": "Color for numeric literals",
443                 "defaults": {
444                     "dark": "#BECEA8",
445                     "light": "#09885A",
446                     "highContrast": "#B5CEA8"
447                 }
448             },
449             {
450                 "id": "ralsp.literal.char",
451                 "description": "Color for character literals",
452                 "defaults": {
453                     "dark": "#BECEA8",
454                     "light": "#09885A",
455                     "highContrast": "#B5CEA8"
456                 }
457             },
458             {
459                 "id": "ralsp.literal.byte",
460                 "description": "Color for byte literals",
461                 "defaults": {
462                     "dark": "#BECEA8",
463                     "light": "#09885A",
464                     "highContrast": "#B5CEA8"
465                 }
466             },
467             {
468                 "id": "ralsp.macro",
469                 "description": "Color for macros",
470                 "defaults": {
471                     "dark": "#BFEBBF",
472                     "light": "#DD6718",
473                     "highContrast": "#ED7718"
474                 }
475             },
476             {
477                 "id": "ralsp.constant",
478                 "description": "Color for constants",
479                 "defaults": {
480                     "dark": "#569cd6",
481                     "light": "#267cb6",
482                     "highContrast": "#569cd6"
483                 }
484             },
485             {
486                 "id": "ralsp.type",
487                 "description": "Color for other types (traits, aliases..)",
488                 "defaults": {
489                     "dark": "#4EC9B0",
490                     "light": "#267F99",
491                     "highContrast": "#4EC9B0"
492                 }
493             },
494             {
495                 "id": "ralsp.type.builtin",
496                 "description": "Color for built-in types (&str, bool, u16, u32)",
497                 "defaults": {
498                     "dark": "#4EC9B0",
499                     "light": "#267F99",
500                     "highContrast": "#4EC9B0"
501                 }
502             },
503             {
504                 "id": "ralsp.type.lifetime",
505                 "description": "Color for `Self` param type",
506                 "defaults": {
507                     "dark": "#4EC9B0",
508                     "light": "#267F99",
509                     "highContrast": "#4EC9B0"
510                 }
511             },
512             {
513                 "id": "ralsp.type.self",
514                 "description": "Color for `Self` param type",
515                 "defaults": {
516                     "dark": "#4EC9B0",
517                     "light": "#267F99",
518                     "highContrast": "#4EC9B0"
519                 }
520             },
521             {
522                 "id": "ralsp.type.param",
523                 "description": "Color for type parameters",
524                 "defaults": {
525                     "dark": "#4EC9B0",
526                     "light": "#267F99",
527                     "highContrast": "#4EC9B0"
528                 }
529             },
530             {
531                 "id": "ralsp.field",
532                 "description": "Color for fields",
533                 "defaults": {
534                     "dark": "#4EC9B0",
535                     "light": "#267F99",
536                     "highContrast": "#4EC9B0"
537                 }
538             },
539             {
540                 "id": "ralsp.variable",
541                 "description": "Color for variables",
542                 "defaults": {
543                     "dark": "#4EC9B0",
544                     "light": "#267F99",
545                     "highContrast": "#4EC9B0"
546                 }
547             },
548             {
549                 "id": "ralsp.variable.mut",
550                 "description": "Color for mutable variables",
551                 "defaults": {
552                     "dark": "#4EC9B0",
553                     "light": "#267F99",
554                     "highContrast": "#4EC9B0"
555                 }
556             },
557             {
558                 "id": "ralsp.module",
559                 "description": "Color for modules",
560                 "defaults": {
561                     "dark": "#D4D4D4",
562                     "light": "#000000",
563                     "highContrast": "#FFFFFF"
564                 }
565             },
566             {
567                 "id": "ralsp.inlayHint",
568                 "description": "Color for inlay hints",
569                 "defaults": {
570                     "dark": "#A0A0A0F0",
571                     "light": "#747474",
572                     "highContrast": "#BEBEBE"
573                 }
574             }
575         ]
576     }
577 }