]> git.lizzy.rs Git - rust.git/blob - editors/code/package.json
ee997e58f5d09c099f63210215e65efd1419c345
[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.37.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         "tabWidth": 4,
31         "singleQuote": true
32     },
33     "dependencies": {
34         "seedrandom": "^3.0.1",
35         "vscode-languageclient": "^5.3.0-next.4"
36     },
37     "devDependencies": {
38         "@types/glob": "^7.1.1",
39         "@types/mocha": "^5.2.7",
40         "@types/node": "^10.14.13",
41         "@types/seedrandom": "^2.4.28",
42         "@types/vscode": "^1.37.0",
43         "glob": "^7.1.4",
44         "mocha": "^6.2.0",
45         "prettier": "^1.18.2",
46         "rollup": "^1.23.1",
47         "rollup-plugin-commonjs": "^10.1.0",
48         "rollup-plugin-node-resolve": "^5.2.0",
49         "rollup-plugin-typescript": "^1.0.1",
50         "shx": "^0.3.1",
51         "tslint": "^5.18.0",
52         "tslint-config-prettier": "^1.18.0",
53         "typescript": "^3.5.3",
54         "vsce": "^1.67.0",
55         "vscode-test": "^1.2.0"
56     },
57     "activationEvents": [
58         "onLanguage:rust",
59         "onCommand:rust-analyzer.analyzerStatus",
60         "onCommand:rust-analyzer.collectGarbage",
61         "workspaceContains:**/Cargo.toml"
62     ],
63     "main": "./bundle/extension",
64     "contributes": {
65         "taskDefinitions": [
66             {
67                 "type": "cargo",
68                 "required": [
69                     "command"
70                 ],
71                 "properties": {
72                     "label": {
73                         "type": "string"
74                     },
75                     "command": {
76                         "type": "string"
77                     },
78                     "args": {
79                         "type": "array"
80                     },
81                     "env": {
82                         "type": "object"
83                     }
84                 }
85             }
86         ],
87         "commands": [
88             {
89                 "command": "rust-analyzer.syntaxTree",
90                 "title": "Show Syntax Tree",
91                 "category": "Rust Analyzer"
92             },
93             {
94                 "command": "rust-analyzer.matchingBrace",
95                 "title": "Find matching brace",
96                 "category": "Rust Analyzer"
97             },
98             {
99                 "command": "rust-analyzer.parentModule",
100                 "title": "Locate parent module",
101                 "category": "Rust Analyzer"
102             },
103             {
104                 "command": "rust-analyzer.joinLines",
105                 "title": "Join lines",
106                 "category": "Rust Analyzer"
107             },
108             {
109                 "command": "rust-analyzer.run",
110                 "title": "Run",
111                 "category": "Rust Analyzer"
112             },
113             {
114                 "command": "rust-analyzer.analyzerStatus",
115                 "title": "Status",
116                 "category": "Rust Analyzer"
117             },
118             {
119                 "command": "rust-analyzer.collectGarbage",
120                 "title": "Run garbage collection",
121                 "category": "Rust Analyzer"
122             },
123             {
124                 "command": "rust-analyzer.reload",
125                 "title": "Restart server",
126                 "category": "Rust Analyzer"
127             },
128             {
129                 "command": "rust-analyzer.startCargoWatch",
130                 "title": "Start Cargo Watch",
131                 "category": "Rust Analyzer"
132             },
133             {
134                 "command": "rust-analyzer.stopCargoWatch",
135                 "title": "Stop Cargo Watch",
136                 "category": "Rust Analyzer"
137             }
138         ],
139         "keybindings": [
140             {
141                 "command": "rust-analyzer.parentModule",
142                 "key": "ctrl+u",
143                 "when": "editorTextFocus && editorLangId == rust"
144             },
145             {
146                 "command": "rust-analyzer.matchingBrace",
147                 "key": "ctrl+shift+m",
148                 "when": "editorTextFocus && editorLangId == rust"
149             },
150             {
151                 "command": "rust-analyzer.joinLines",
152                 "key": "ctrl+shift+j",
153                 "when": "editorTextFocus && editorLangId == rust"
154             },
155             {
156                 "command": "rust-analyzer.run",
157                 "key": "ctrl+r",
158                 "when": "editorTextFocus && editorLangId == rust"
159             }
160         ],
161         "configuration": {
162             "type": "object",
163             "title": "Rust Analyzer",
164             "properties": {
165                 "rust-analyzer.highlightingOn": {
166                     "type": "boolean",
167                     "default": false,
168                     "description": "Highlight Rust code (overrides built-in syntax highlighting)"
169                 },
170                 "rust-analyzer.rainbowHighlightingOn": {
171                     "type": "boolean",
172                     "default": false,
173                     "description": "When highlighting Rust code, use a unique color per identifier"
174                 },
175                 "rust-analyzer.featureFlags": {
176                     "type": "object",
177                     "default": {},
178                     "description": "Fine grained feature flags to disable annoying features"
179                 },
180                 "rust-analyzer.enableEnhancedTyping": {
181                     "type": "boolean",
182                     "default": true,
183                     "description": "Enables enhanced typing. NOTE: If using a VIM extension, you should set this to false"
184                 },
185                 "rust-analyzer.raLspServerPath": {
186                     "type": [
187                         "string"
188                     ],
189                     "default": "ra_lsp_server",
190                     "description": "Path to ra_lsp_server executable"
191                 },
192                 "rust-analyzer.enableCargoWatchOnStartup": {
193                     "type": "string",
194                     "default": "ask",
195                     "enum": [
196                         "ask",
197                         "enabled",
198                         "disabled"
199                     ],
200                     "enumDescriptions": [
201                         "Asks each time whether to run `cargo watch`",
202                         "`cargo watch` is always started",
203                         "Don't start `cargo watch`"
204                     ],
205                     "description": "Whether to run `cargo watch` on startup"
206                 },
207                 "rust-analyzer.excludeGlobs": {
208                     "type": "array",
209                     "default": [],
210                     "description": "Paths to exclude from analysis"
211                 },
212                 "rust-analyzer.useClientWatching": {
213                     "type": "boolean",
214                     "default": false,
215                     "description": "client provided file watching instead of notify watching."
216                 },
217                 "rust-analyzer.cargo-watch.arguments": {
218                     "type": "string",
219                     "description": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )",
220                     "default": ""
221                 },
222                 "rust-analyzer.cargo-watch.command": {
223                     "type": "string",
224                     "description": "`cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )",
225                     "default": "check"
226                 },
227                 "rust-analyzer.cargo-watch.ignore": {
228                     "type": "array",
229                     "description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)",
230                     "default": []
231                 },
232                 "rust-analyzer.trace.server": {
233                     "type": "string",
234                     "scope": "window",
235                     "enum": [
236                         "off",
237                         "messages",
238                         "verbose"
239                     ],
240                     "enumDescriptions": [
241                         "No traces",
242                         "Error only",
243                         "Full log"
244                     ],
245                     "default": "off",
246                     "description": "Trace requests to the ra_lsp_server"
247                 },
248                 "rust-analyzer.trace.cargo-watch": {
249                     "type": "string",
250                     "scope": "window",
251                     "enum": [
252                         "off",
253                         "error",
254                         "verbose"
255                     ],
256                     "default": "off",
257                     "description": "Trace output of cargo-watch"
258                 },
259                 "rust-analyzer.lruCapacity": {
260                     "type": "number",
261                     "default": null,
262                     "description": "Number of syntax trees rust-analyzer keeps in memory"
263                 },
264                 "rust-analyzer.displayInlayHints": {
265                     "type": "boolean",
266                     "default": true,
267                     "description": "Display additional type information in the editor"
268                 },
269                 "rust-analyzer.maxInlayHintLength": {
270                     "type": "number",
271                     "default": 20,
272                     "description": "Maximum length for inlay hints"
273                 }
274             }
275         },
276         "problemPatterns": [
277             {
278                 "name": "rustc",
279                 "patterns": [
280                     {
281                         "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
282                         "severity": 1,
283                         "code": 2,
284                         "message": 3
285                     },
286                     {
287                         "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
288                         "file": 1,
289                         "line": 2,
290                         "column": 3
291                     }
292                 ]
293             }
294         ],
295         "problemMatchers": [
296             {
297                 "name": "rustc",
298                 "fileLocation": [
299                     "relative",
300                     "${workspaceRoot}"
301                 ],
302                 "pattern": "$rustc"
303             },
304             {
305                 "name": "rustc-watch",
306                 "fileLocation": [
307                     "relative",
308                     "${workspaceRoot}"
309                 ],
310                 "background": {
311                     "beginsPattern": "^\\[Running\\b",
312                     "endsPattern": "^\\[Finished running\\b"
313                 },
314                 "pattern": "$rustc"
315             }
316         ],
317         "colors": [
318             {
319                 "id": "ralsp.comment",
320                 "description": "Color for comments",
321                 "defaults": {
322                     "dark": "#6A9955",
323                     "light": "#008000",
324                     "highContrast": "#7CA668"
325                 }
326             },
327             {
328                 "id": "ralsp.string",
329                 "description": "Color for strings",
330                 "defaults": {
331                     "dark": "#CE9178",
332                     "light": "#A31515",
333                     "highContrast": "#CE9178"
334                 }
335             },
336             {
337                 "id": "ralsp.keyword",
338                 "description": "Color for keywords",
339                 "defaults": {
340                     "dark": "#569cd6",
341                     "light": "#0000FF",
342                     "highContrast": "#569CD6"
343                 }
344             },
345             {
346                 "id": "ralsp.keyword.control",
347                 "description": "Color for control keywords",
348                 "defaults": {
349                     "dark": "#C586C0",
350                     "light": "#AF00DB",
351                     "highContrast": "#C586C0"
352                 }
353             },
354             {
355                 "id": "ralsp.keyword.unsafe",
356                 "description": "Color for unsafe",
357                 "defaults": {
358                     "dark": "#FF3030",
359                     "light": "#FF1010",
360                     "highContrast": "#FF1010"
361                 }
362             },
363             {
364                 "id": "ralsp.function",
365                 "description": "Color for functions",
366                 "defaults": {
367                     "dark": "#DCDCAA",
368                     "light": "#795E26",
369                     "highContrast": "#DCDCAA"
370                 }
371             },
372             {
373                 "id": "ralsp.parameter",
374                 "description": "Color for parameters",
375                 "defaults": {
376                     "dark": "#9CDCFE",
377                     "light": "#001080",
378                     "highContrast": "#9CDCFE"
379                 }
380             },
381             {
382                 "id": "ralsp.builtin",
383                 "description": "Color for builtins",
384                 "defaults": {
385                     "dark": "#DD6718",
386                     "light": "#DD6718",
387                     "highContrast": "#DD6718"
388                 }
389             },
390             {
391                 "id": "ralsp.text",
392                 "description": "Color for text",
393                 "defaults": {
394                     "dark": "#D4D4D4",
395                     "light": "#000000",
396                     "highContrast": "#FFFFFF"
397                 }
398             },
399             {
400                 "id": "ralsp.attribute",
401                 "description": "Color for attributes",
402                 "defaults": {
403                     "dark": "#9FE9BF",
404                     "light": "#1F4B1F",
405                     "highContrast": "#108010"
406                 }
407             },
408             {
409                 "id": "ralsp.literal",
410                 "description": "Color for literals",
411                 "defaults": {
412                     "dark": "#BECEA8",
413                     "light": "#09885A",
414                     "highContrast": "#B5CEA8"
415                 }
416             },
417             {
418                 "id": "ralsp.macro",
419                 "description": "Color for macros",
420                 "defaults": {
421                     "dark": "#BFEBBF",
422                     "light": "#DD6718",
423                     "highContrast": "#ED7718"
424                 }
425             },
426             {
427                 "id": "ralsp.constant",
428                 "description": "Color for constants",
429                 "defaults": {
430                     "dark": "#569cd6",
431                     "light": "#267cb6",
432                     "highContrast": "#569cd6"
433                 }
434             },
435             {
436                 "id": "ralsp.type",
437                 "description": "Color for types",
438                 "defaults": {
439                     "dark": "#4EC9B0",
440                     "light": "#267F99",
441                     "highContrast": "#4EC9B0"
442                 }
443             },
444             {
445                 "id": "ralsp.field",
446                 "description": "Color for fields",
447                 "defaults": {
448                     "dark": "#4EC9B0",
449                     "light": "#267F99",
450                     "highContrast": "#4EC9B0"
451                 }
452             },
453             {
454                 "id": "ralsp.variable",
455                 "description": "Color for variables",
456                 "defaults": {
457                     "dark": "#4EC9B0",
458                     "light": "#267F99",
459                     "highContrast": "#4EC9B0"
460                 }
461             },
462             {
463                 "id": "ralsp.variable.mut",
464                 "description": "Color for mutable variables",
465                 "defaults": {
466                     "dark": "#4EC9B0",
467                     "light": "#267F99",
468                     "highContrast": "#4EC9B0"
469                 }
470             },
471             {
472                 "id": "ralsp.module",
473                 "description": "Color for modules",
474                 "defaults": {
475                     "dark": "#D4D4D4",
476                     "light": "#000000",
477                     "highContrast": "#FFFFFF"
478                 }
479             },
480             {
481                 "id": "ralsp.inlayHint",
482                 "description": "Color for inlay hints",
483                 "defaults": {
484                     "dark": "#A0A0A0F0",
485                     "light": "#747474",
486                     "highContrast": "#BEBEBE"
487                 }
488             }
489         ]
490     }
491 }