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