]> git.lizzy.rs Git - rust.git/blob - editors/code/package.json
9290599c7adee7f3c2cdbe0f5e0f37071e4e945a
[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                 "name": "rustc-json",
319                 "patterns": [
320                     {
321                         "regexp": "^.*\"message\":{\"message\":\"([^\"]*).*?\"file_name\":\"([^\"]+).*?\"line_start\":(\\d+).*?\"line_end\":(\\d+).*?\"column_start\":(\\d+).*?\"column_end\":(\\d+).*}$",
322                         "message": 1,
323                         "file": 2,
324                         "line": 3,
325                         "endLine": 4,
326                         "column": 5,
327                         "endColumn": 6
328                     }
329                 ]
330             }
331         ],
332         "problemMatchers": [
333             {
334                 "name": "rustc",
335                 "fileLocation": [
336                     "relative",
337                     "${workspaceRoot}"
338                 ],
339                 "pattern": "$rustc"
340             },
341             {
342                 "name": "rustc-json",
343                 "fileLocation": [
344                     "relative",
345                     "${workspaceRoot}"
346                 ],
347                 "pattern": "$rustc-json"
348             },
349             {
350                 "name": "rustc-watch",
351                 "fileLocation": [
352                     "relative",
353                     "${workspaceRoot}"
354                 ],
355                 "background": {
356                     "beginsPattern": "^\\[Running\\b",
357                     "endsPattern": "^\\[Finished running\\b"
358                 },
359                 "pattern": "$rustc"
360             }
361         ],
362         "colors": [
363             {
364                 "id": "ralsp.comment",
365                 "description": "Color for comments",
366                 "defaults": {
367                     "dark": "#6A9955",
368                     "light": "#008000",
369                     "highContrast": "#7CA668"
370                 }
371             },
372             {
373                 "id": "ralsp.string",
374                 "description": "Color for strings",
375                 "defaults": {
376                     "dark": "#CE9178",
377                     "light": "#A31515",
378                     "highContrast": "#CE9178"
379                 }
380             },
381             {
382                 "id": "ralsp.keyword",
383                 "description": "Color for keywords",
384                 "defaults": {
385                     "dark": "#569cd6",
386                     "light": "#0000FF",
387                     "highContrast": "#569CD6"
388                 }
389             },
390             {
391                 "id": "ralsp.keyword.control",
392                 "description": "Color for control keywords",
393                 "defaults": {
394                     "dark": "#C586C0",
395                     "light": "#AF00DB",
396                     "highContrast": "#C586C0"
397                 }
398             },
399             {
400                 "id": "ralsp.keyword.unsafe",
401                 "description": "Color for unsafe",
402                 "defaults": {
403                     "dark": "#FF3030",
404                     "light": "#FF1010",
405                     "highContrast": "#FF1010"
406                 }
407             },
408             {
409                 "id": "ralsp.function",
410                 "description": "Color for functions",
411                 "defaults": {
412                     "dark": "#DCDCAA",
413                     "light": "#795E26",
414                     "highContrast": "#DCDCAA"
415                 }
416             },
417             {
418                 "id": "ralsp.parameter",
419                 "description": "Color for parameters",
420                 "defaults": {
421                     "dark": "#9CDCFE",
422                     "light": "#001080",
423                     "highContrast": "#9CDCFE"
424                 }
425             },
426             {
427                 "id": "ralsp.builtin",
428                 "description": "Color for builtins",
429                 "defaults": {
430                     "dark": "#DD6718",
431                     "light": "#DD6718",
432                     "highContrast": "#DD6718"
433                 }
434             },
435             {
436                 "id": "ralsp.text",
437                 "description": "Color for text",
438                 "defaults": {
439                     "dark": "#D4D4D4",
440                     "light": "#000000",
441                     "highContrast": "#FFFFFF"
442                 }
443             },
444             {
445                 "id": "ralsp.attribute",
446                 "description": "Color for attributes",
447                 "defaults": {
448                     "dark": "#9FE9BF",
449                     "light": "#1F4B1F",
450                     "highContrast": "#108010"
451                 }
452             },
453             {
454                 "id": "ralsp.literal",
455                 "description": "Color for literals",
456                 "defaults": {
457                     "dark": "#BECEA8",
458                     "light": "#09885A",
459                     "highContrast": "#B5CEA8"
460                 }
461             },
462             {
463                 "id": "ralsp.literal.numeric",
464                 "description": "Color for numeric literals",
465                 "defaults": {
466                     "dark": "#BECEA8",
467                     "light": "#09885A",
468                     "highContrast": "#B5CEA8"
469                 }
470             },
471             {
472                 "id": "ralsp.literal.char",
473                 "description": "Color for character literals",
474                 "defaults": {
475                     "dark": "#BECEA8",
476                     "light": "#09885A",
477                     "highContrast": "#B5CEA8"
478                 }
479             },
480             {
481                 "id": "ralsp.literal.byte",
482                 "description": "Color for byte literals",
483                 "defaults": {
484                     "dark": "#BECEA8",
485                     "light": "#09885A",
486                     "highContrast": "#B5CEA8"
487                 }
488             },
489             {
490                 "id": "ralsp.macro",
491                 "description": "Color for macros",
492                 "defaults": {
493                     "dark": "#BFEBBF",
494                     "light": "#DD6718",
495                     "highContrast": "#ED7718"
496                 }
497             },
498             {
499                 "id": "ralsp.constant",
500                 "description": "Color for constants",
501                 "defaults": {
502                     "dark": "#569cd6",
503                     "light": "#267cb6",
504                     "highContrast": "#569cd6"
505                 }
506             },
507             {
508                 "id": "ralsp.type",
509                 "description": "Color for other types (traits, aliases..)",
510                 "defaults": {
511                     "dark": "#4EC9B0",
512                     "light": "#267F99",
513                     "highContrast": "#4EC9B0"
514                 }
515             },
516             {
517                 "id": "ralsp.type.builtin",
518                 "description": "Color for built-in types (&str, bool, u16, u32)",
519                 "defaults": {
520                     "dark": "#4EC9B0",
521                     "light": "#267F99",
522                     "highContrast": "#4EC9B0"
523                 }
524             },
525             {
526                 "id": "ralsp.type.lifetime",
527                 "description": "Color for `Self` param type",
528                 "defaults": {
529                     "dark": "#4EC9B0",
530                     "light": "#267F99",
531                     "highContrast": "#4EC9B0"
532                 }
533             },
534             {
535                 "id": "ralsp.type.self",
536                 "description": "Color for `Self` param type",
537                 "defaults": {
538                     "dark": "#4EC9B0",
539                     "light": "#267F99",
540                     "highContrast": "#4EC9B0"
541                 }
542             },
543             {
544                 "id": "ralsp.type.param",
545                 "description": "Color for type parameters",
546                 "defaults": {
547                     "dark": "#4EC9B0",
548                     "light": "#267F99",
549                     "highContrast": "#4EC9B0"
550                 }
551             },
552             {
553                 "id": "ralsp.field",
554                 "description": "Color for fields",
555                 "defaults": {
556                     "dark": "#4EC9B0",
557                     "light": "#267F99",
558                     "highContrast": "#4EC9B0"
559                 }
560             },
561             {
562                 "id": "ralsp.variable",
563                 "description": "Color for variables",
564                 "defaults": {
565                     "dark": "#4EC9B0",
566                     "light": "#267F99",
567                     "highContrast": "#4EC9B0"
568                 }
569             },
570             {
571                 "id": "ralsp.variable.mut",
572                 "description": "Color for mutable variables",
573                 "defaults": {
574                     "dark": "#4EC9B0",
575                     "light": "#267F99",
576                     "highContrast": "#4EC9B0"
577                 }
578             },
579             {
580                 "id": "ralsp.module",
581                 "description": "Color for modules",
582                 "defaults": {
583                     "dark": "#D4D4D4",
584                     "light": "#000000",
585                     "highContrast": "#FFFFFF"
586                 }
587             },
588             {
589                 "id": "ralsp.inlayHint",
590                 "description": "Color for inlay hints",
591                 "defaults": {
592                     "dark": "#A0A0A0F0",
593                     "light": "#747474",
594                     "highContrast": "#BEBEBE"
595                 }
596             }
597         ]
598     }
599 }