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