]> git.lizzy.rs Git - rust.git/blob - editors/code/package.json
b9982c624a697f9046afc8822327f7ca52806c44
[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.36.0",
43         "glob": "^7.1.4",
44         "mocha": "^6.2.0",
45         "prettier": "^1.18.2",
46         "rollup": "^1.21.4",
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.66.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.trace.server": {
228                     "type": "string",
229                     "scope": "window",
230                     "enum": [
231                         "off",
232                         "messages",
233                         "verbose"
234                     ],
235                     "enumDescriptions": [
236                         "No traces",
237                         "Error only",
238                         "Full log"
239                     ],
240                     "default": "off",
241                     "description": "Trace requests to the ra_lsp_server"
242                 },
243                 "rust-analyzer.trace.cargo-watch": {
244                     "type": "string",
245                     "scope": "window",
246                     "enum": [
247                         "off",
248                         "error",
249                         "verbose"
250                     ],
251                     "default": "off",
252                     "description": "Trace output of cargo-watch"
253                 },
254                 "rust-analyzer.lruCapacity": {
255                     "type": "number",
256                     "default": null,
257                     "description": "Number of syntax trees rust-analyzer keeps in memory"
258                 },
259                 "rust-analyzer.displayInlayHints": {
260                     "type": "boolean",
261                     "default": true,
262                     "description": "Display additional type information in the editor"
263                 }
264             }
265         },
266         "problemPatterns": [
267             {
268                 "name": "rustc",
269                 "patterns": [
270                     {
271                         "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
272                         "severity": 1,
273                         "code": 2,
274                         "message": 3
275                     },
276                     {
277                         "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
278                         "file": 1,
279                         "line": 2,
280                         "column": 3
281                     }
282                 ]
283             }
284         ],
285         "problemMatchers": [
286             {
287                 "name": "rustc",
288                 "fileLocation": [
289                     "relative",
290                     "${workspaceRoot}"
291                 ],
292                 "pattern": "$rustc"
293             },
294             {
295                 "name": "rustc-watch",
296                 "fileLocation": [
297                     "relative",
298                     "${workspaceRoot}"
299                 ],
300                 "background": {
301                     "beginsPattern": "^\\[Running\\b",
302                     "endsPattern": "^\\[Finished running\\b"
303                 },
304                 "pattern": "$rustc"
305             }
306         ],
307         "colors": [
308             {
309                 "id": "ralsp.comment",
310                 "description": "Color for comments",
311                 "defaults": {
312                     "dark": "#6A9955",
313                     "light": "#008000",
314                     "highContrast": "#7CA668"
315                 }
316             },
317             {
318                 "id": "ralsp.string",
319                 "description": "Color for strings",
320                 "defaults": {
321                     "dark": "#CE9178",
322                     "light": "#A31515",
323                     "highContrast": "#CE9178"
324                 }
325             },
326             {
327                 "id": "ralsp.keyword",
328                 "description": "Color for keywords",
329                 "defaults": {
330                     "dark": "#569cd6",
331                     "light": "#0000FF",
332                     "highContrast": "#569CD6"
333                 }
334             },
335             {
336                 "id": "ralsp.keyword.control",
337                 "description": "Color for control keywords",
338                 "defaults": {
339                     "dark": "#C586C0",
340                     "light": "#AF00DB",
341                     "highContrast": "#C586C0"
342                 }
343             },
344             {
345                 "id": "ralsp.keyword.unsafe",
346                 "description": "Color for unsafe",
347                 "defaults": {
348                     "dark": "#FF3030",
349                     "light": "#FF1010",
350                     "highContrast": "#FF1010"
351                 }
352             },
353             {
354                 "id": "ralsp.function",
355                 "description": "Color for functions",
356                 "defaults": {
357                     "dark": "#DCDCAA",
358                     "light": "#795E26",
359                     "highContrast": "#DCDCAA"
360                 }
361             },
362             {
363                 "id": "ralsp.parameter",
364                 "description": "Color for parameters",
365                 "defaults": {
366                     "dark": "#9CDCFE",
367                     "light": "#001080",
368                     "highContrast": "#9CDCFE"
369                 }
370             },
371             {
372                 "id": "ralsp.builtin",
373                 "description": "Color for builtins",
374                 "defaults": {
375                     "dark": "#DD6718",
376                     "light": "#DD6718",
377                     "highContrast": "#DD6718"
378                 }
379             },
380             {
381                 "id": "ralsp.text",
382                 "description": "Color for text",
383                 "defaults": {
384                     "dark": "#D4D4D4",
385                     "light": "#000000",
386                     "highContrast": "#FFFFFF"
387                 }
388             },
389             {
390                 "id": "ralsp.attribute",
391                 "description": "Color for attributes",
392                 "defaults": {
393                     "dark": "#9FE9BF",
394                     "light": "#1F4B1F",
395                     "highContrast": "#108010"
396                 }
397             },
398             {
399                 "id": "ralsp.literal",
400                 "description": "Color for literals",
401                 "defaults": {
402                     "dark": "#BECEA8",
403                     "light": "#09885A",
404                     "highContrast": "#B5CEA8"
405                 }
406             },
407             {
408                 "id": "ralsp.macro",
409                 "description": "Color for macros",
410                 "defaults": {
411                     "dark": "#BFEBBF",
412                     "light": "#DD6718",
413                     "highContrast": "#ED7718"
414                 }
415             },
416             {
417                 "id": "ralsp.constant",
418                 "description": "Color for constants",
419                 "defaults": {
420                     "dark": "#569cd6",
421                     "light": "#267cb6",
422                     "highContrast": "#569cd6"
423                 }
424             },
425             {
426                 "id": "ralsp.type",
427                 "description": "Color for types",
428                 "defaults": {
429                     "dark": "#4EC9B0",
430                     "light": "#267F99",
431                     "highContrast": "#4EC9B0"
432                 }
433             },
434             {
435                 "id": "ralsp.field",
436                 "description": "Color for fields",
437                 "defaults": {
438                     "dark": "#4EC9B0",
439                     "light": "#267F99",
440                     "highContrast": "#4EC9B0"
441                 }
442             },
443             {
444                 "id": "ralsp.variable",
445                 "description": "Color for variables",
446                 "defaults": {
447                     "dark": "#4EC9B0",
448                     "light": "#267F99",
449                     "highContrast": "#4EC9B0"
450                 }
451             },
452             {
453                 "id": "ralsp.variable.mut",
454                 "description": "Color for mutable variables",
455                 "defaults": {
456                     "dark": "#4EC9B0",
457                     "light": "#267F99",
458                     "highContrast": "#4EC9B0"
459                 }
460             },
461             {
462                 "id": "ralsp.module",
463                 "description": "Color for modules",
464                 "defaults": {
465                     "dark": "#D4D4D4",
466                     "light": "#000000",
467                     "highContrast": "#FFFFFF"
468                 }
469             },
470             {
471                 "id": "ralsp.inlayHint",
472                 "description": "Color for inlay hints",
473                 "defaults": {
474                     "dark": "#A0A0A0F0",
475                     "light": "#747474",
476                     "highContrast": "#BEBEBE"
477                 }
478             }
479         ]
480     }
481 }