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