diff options
Diffstat (limited to 'editors/code/package.json')
-rw-r--r-- | editors/code/package.json | 370 |
1 files changed, 184 insertions, 186 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 146b696e9..88b7ee86a 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -49,7 +49,7 @@ | |||
49 | "tslib": "^1.11.1", | 49 | "tslib": "^1.11.1", |
50 | "typescript": "^3.8.3", | 50 | "typescript": "^3.8.3", |
51 | "typescript-formatter": "^7.2.2", | 51 | "typescript-formatter": "^7.2.2", |
52 | "vsce": "^1.74.0" | 52 | "vsce": "^1.75.0" |
53 | }, | 53 | }, |
54 | "activationEvents": [ | 54 | "activationEvents": [ |
55 | "onLanguage:rust", | 55 | "onLanguage:rust", |
@@ -177,91 +177,70 @@ | |||
177 | "type": "object", | 177 | "type": "object", |
178 | "title": "Rust Analyzer", | 178 | "title": "Rust Analyzer", |
179 | "properties": { | 179 | "properties": { |
180 | "rust-analyzer.highlighting.semanticTokens": { | 180 | "rust-analyzer.diagnostics.enable": { |
181 | "type": "boolean", | 181 | "type": "boolean", |
182 | "default": false, | 182 | "default": true, |
183 | "description": "Use proposed semantic tokens API for syntax highlighting" | 183 | "markdownDescription": "Whether to show native rust-analyzer diagnostics." |
184 | }, | ||
185 | "rust-analyzer.highlightingOn": { | ||
186 | "type": "boolean", | ||
187 | "default": false, | ||
188 | "description": "Highlight Rust code (overrides built-in syntax highlighting)" | ||
189 | }, | ||
190 | "rust-analyzer.rainbowHighlightingOn": { | ||
191 | "type": "boolean", | ||
192 | "default": false, | ||
193 | "description": "When highlighting Rust code, use a unique color per identifier" | ||
194 | }, | 184 | }, |
195 | "rust-analyzer.featureFlags": { | 185 | "rust-analyzer.lruCapacity": { |
196 | "type": "object", | 186 | "type": [ |
197 | "default": {}, | 187 | "null", |
198 | "description": "Fine grained feature flags to disable annoying features", | 188 | "integer" |
199 | "properties": { | 189 | ], |
200 | "lsp.diagnostics": { | 190 | "default": null, |
201 | "type": "boolean", | 191 | "minimum": 0, |
202 | "markdownDescription": "Whether to show diagnostics from `cargo check`" | 192 | "exclusiveMinimum": true, |
203 | }, | 193 | "description": "Number of syntax trees rust-analyzer keeps in memory." |
204 | "completion.insertion.add-call-parenthesis": { | ||
205 | "type": "boolean", | ||
206 | "description": "Whether to add parenthesis when completing functions" | ||
207 | }, | ||
208 | "completion.insertion.add-argument-snippets": { | ||
209 | "type": "boolean", | ||
210 | "description": "Whether to add argument snippets when completing functions" | ||
211 | }, | ||
212 | "completion.enable-postfix": { | ||
213 | "type": "boolean", | ||
214 | "markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc." | ||
215 | }, | ||
216 | "call-info.full": { | ||
217 | "type": "boolean", | ||
218 | "description": "Show function name and docs in parameter hints" | ||
219 | }, | ||
220 | "notifications.workspace-loaded": { | ||
221 | "type": "boolean", | ||
222 | "markdownDescription": "Whether to show `workspace loaded` message" | ||
223 | }, | ||
224 | "notifications.cargo-toml-not-found": { | ||
225 | "type": "boolean", | ||
226 | "markdownDescription": "Whether to show `can't find Cargo.toml` error message" | ||
227 | } | ||
228 | } | ||
229 | }, | 194 | }, |
230 | "rust-analyzer.updates.channel": { | 195 | "rust-analyzer.files.watcher": { |
231 | "type": "string", | 196 | "type": "string", |
232 | "enum": [ | 197 | "enum": [ |
233 | "stable", | 198 | "client", |
234 | "nightly" | 199 | "notify" |
235 | ], | ||
236 | "default": "stable", | ||
237 | "markdownEnumDescriptions": [ | ||
238 | "`\"stable\"` updates are shipped weekly, they don't contain cutting-edge features from VSCode proposed APIs but have less bugs in general", | ||
239 | "`\"nightly\"` updates are shipped daily (extension updates automatically by downloading artifacts directly from GitHub), they contain cutting-edge features and latest bug fixes. These releases help us get your feedback very quickly and speed up rust-analyzer development **drastically**" | ||
240 | ], | 200 | ], |
241 | "markdownDescription": "Choose `\"nightly\"` updates to get the latest features and bug fixes every day. While `\"stable\"` releases occur weekly and don't contain cutting-edge features from VSCode proposed APIs" | 201 | "default": "client", |
202 | "description": "Controls file watching implementation." | ||
242 | }, | 203 | }, |
243 | "rust-analyzer.updates.askBeforeDownload": { | 204 | "rust-analyzer.files.exclude": { |
205 | "type": "array", | ||
206 | "items": { | ||
207 | "type": "string" | ||
208 | }, | ||
209 | "default": [], | ||
210 | "description": "Paths to exclude from analysis." | ||
211 | }, | ||
212 | "rust-analyzer.notifications.workspaceLoaded": { | ||
244 | "type": "boolean", | 213 | "type": "boolean", |
245 | "default": true, | 214 | "markdownDescription": "Whether to show `workspace loaded` message." |
246 | "description": "Whether to ask for permission before downloading any files from the Internet" | ||
247 | }, | 215 | }, |
248 | "rust-analyzer.serverPath": { | 216 | "rust-analyzer.notifications.cargoTomlNotFound": { |
249 | "type": [ | 217 | "type": "boolean", |
250 | "null", | 218 | "markdownDescription": "Whether to show `can't find Cargo.toml` error message" |
251 | "string" | 219 | }, |
252 | ], | 220 | "rust-analyzer.cargo.noDefaultFeatures": { |
253 | "default": null, | 221 | "type": "boolean", |
254 | "description": "Path to rust-analyzer executable (points to bundled binary by default). If this is set, then \"rust-analyzer.updates.channel\" setting is not used" | 222 | "default": false, |
223 | "markdownDescription": "Do not activate the `default` feature" | ||
224 | }, | ||
225 | "rust-analyzer.cargo.allFeatures": { | ||
226 | "type": "boolean", | ||
227 | "default": true, | ||
228 | "description": "Activate all available features" | ||
255 | }, | 229 | }, |
256 | "rust-analyzer.excludeGlobs": { | 230 | "rust-analyzer.cargo.features": { |
257 | "type": "array", | 231 | "type": "array", |
258 | "items": { | 232 | "items": { |
259 | "type": "string" | 233 | "type": "string" |
260 | }, | 234 | }, |
261 | "default": [], | 235 | "default": [], |
262 | "description": "Paths to exclude from analysis" | 236 | "description": "List of features to activate" |
237 | }, | ||
238 | "rust-analyzer.cargo.loadOutDirsFromCheck": { | ||
239 | "type": "boolean", | ||
240 | "default": false, | ||
241 | "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" | ||
263 | }, | 242 | }, |
264 | "rust-analyzer.rustfmtArgs": { | 243 | "rust-analyzer.rustfmt.extraArgs": { |
265 | "type": "array", | 244 | "type": "array", |
266 | "items": { | 245 | "items": { |
267 | "type": "string" | 246 | "type": "string" |
@@ -269,64 +248,42 @@ | |||
269 | "default": [], | 248 | "default": [], |
270 | "description": "Additional arguments to rustfmt" | 249 | "description": "Additional arguments to rustfmt" |
271 | }, | 250 | }, |
272 | "rust-analyzer.useClientWatching": { | 251 | "rust-analyzer.rustfmt.overrideCommand": { |
273 | "type": "boolean", | 252 | "type": "array", |
274 | "default": true, | 253 | "items": { |
275 | "description": "client provided file watching instead of notify watching." | 254 | "type": "string" |
255 | }, | ||
256 | "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for formatting." | ||
276 | }, | 257 | }, |
277 | "rust-analyzer.cargo-watch.enable": { | 258 | "rust-analyzer.checkOnSave.enable": { |
278 | "type": "boolean", | 259 | "type": "boolean", |
279 | "default": true, | 260 | "default": true, |
280 | "markdownDescription": "Run specified `cargo-watch` command for diagnostics on save" | 261 | "markdownDescription": "Run specified `cargo check` command for diagnostics on save" |
281 | }, | 262 | }, |
282 | "rust-analyzer.cargo-watch.arguments": { | 263 | "rust-analyzer.checkOnSave.extraArgs": { |
283 | "type": "array", | 264 | "type": "array", |
284 | "items": { | 265 | "items": { |
285 | "type": "string" | 266 | "type": "string" |
286 | }, | 267 | }, |
287 | "markdownDescription": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )", | 268 | "markdownDescription": "Extra arguments for `cargo check`", |
288 | "default": [] | 269 | "default": [] |
289 | }, | 270 | }, |
290 | "rust-analyzer.cargo-watch.command": { | 271 | "rust-analyzer.checkOnSave.command": { |
291 | "type": "string", | 272 | "type": "string", |
292 | "markdownDescription": "`cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )", | 273 | "default": "check", |
293 | "default": "check" | 274 | "markdownDescription": "Cargo command to use for `cargo check`" |
294 | }, | 275 | }, |
295 | "rust-analyzer.cargo-watch.allTargets": { | 276 | "rust-analyzer.checkOnSave.overrideCommand": { |
296 | "type": "boolean", | 277 | "type": "array", |
297 | "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)", | 278 | "items": { |
298 | "default": true | 279 | "type": "string" |
299 | }, | 280 | }, |
300 | "rust-analyzer.trace.server": { | 281 | "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message=format=json` or similar option." |
301 | "type": "string", | ||
302 | "scope": "window", | ||
303 | "enum": [ | ||
304 | "off", | ||
305 | "messages", | ||
306 | "verbose" | ||
307 | ], | ||
308 | "enumDescriptions": [ | ||
309 | "No traces", | ||
310 | "Error only", | ||
311 | "Full log" | ||
312 | ], | ||
313 | "default": "off", | ||
314 | "description": "Trace requests to the rust-analyzer" | ||
315 | }, | 282 | }, |
316 | "rust-analyzer.trace.extension": { | 283 | "rust-analyzer.checkOnSave.allTargets": { |
317 | "description": "Enable logging of VS Code extensions itself", | ||
318 | "type": "boolean", | 284 | "type": "boolean", |
319 | "default": false | 285 | "default": true, |
320 | }, | 286 | "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)" |
321 | "rust-analyzer.lruCapacity": { | ||
322 | "type": [ | ||
323 | "null", | ||
324 | "integer" | ||
325 | ], | ||
326 | "default": null, | ||
327 | "minimum": 0, | ||
328 | "exclusiveMinimum": true, | ||
329 | "description": "Number of syntax trees rust-analyzer keeps in memory" | ||
330 | }, | 287 | }, |
331 | "rust-analyzer.inlayHints.typeHints": { | 288 | "rust-analyzer.inlayHints.typeHints": { |
332 | "type": "boolean", | 289 | "type": "boolean", |
@@ -353,28 +310,76 @@ | |||
353 | "exclusiveMinimum": true, | 310 | "exclusiveMinimum": true, |
354 | "description": "Maximum length for inlay hints" | 311 | "description": "Maximum length for inlay hints" |
355 | }, | 312 | }, |
356 | "rust-analyzer.cargoFeatures.noDefaultFeatures": { | 313 | "rust-analyzer.completion.addCallParenthesis": { |
357 | "type": "boolean", | 314 | "type": "boolean", |
358 | "default": false, | 315 | "default": true, |
359 | "markdownDescription": "Do not activate the `default` feature" | 316 | "description": "Whether to add parenthesis when completing functions" |
360 | }, | 317 | }, |
361 | "rust-analyzer.cargoFeatures.allFeatures": { | 318 | "rust-analyzer.completion.addCallArgumentSnippets": { |
362 | "type": "boolean", | 319 | "type": "boolean", |
363 | "default": true, | 320 | "default": true, |
364 | "description": "Activate all available features" | 321 | "description": "Whether to add argument snippets when completing functions" |
365 | }, | 322 | }, |
366 | "rust-analyzer.cargoFeatures.features": { | 323 | "rust-analyzer.completion.postfix.enable": { |
367 | "type": "array", | 324 | "type": "boolean", |
368 | "items": { | 325 | "default": true, |
369 | "type": "string" | 326 | "markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc." |
370 | }, | ||
371 | "default": [], | ||
372 | "description": "List of features to activate" | ||
373 | }, | 327 | }, |
374 | "rust-analyzer.cargoFeatures.loadOutDirsFromCheck": { | 328 | "rust-analyzer.callInfo.full": { |
329 | "type": "boolean", | ||
330 | "description": "Show function name and docs in parameter hints" | ||
331 | }, | ||
332 | "rust-analyzer.highlighting.semanticTokens": { | ||
375 | "type": "boolean", | 333 | "type": "boolean", |
376 | "default": false, | 334 | "default": false, |
377 | "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" | 335 | "description": "Use proposed semantic tokens API for syntax highlighting" |
336 | }, | ||
337 | "rust-analyzer.updates.channel": { | ||
338 | "type": "string", | ||
339 | "enum": [ | ||
340 | "stable", | ||
341 | "nightly" | ||
342 | ], | ||
343 | "default": "stable", | ||
344 | "markdownEnumDescriptions": [ | ||
345 | "`\"stable\"` updates are shipped weekly, they don't contain cutting-edge features from VSCode proposed APIs but have less bugs in general", | ||
346 | "`\"nightly\"` updates are shipped daily (extension updates automatically by downloading artifacts directly from GitHub), they contain cutting-edge features and latest bug fixes. These releases help us get your feedback very quickly and speed up rust-analyzer development **drastically**" | ||
347 | ], | ||
348 | "markdownDescription": "Choose `\"nightly\"` updates to get the latest features and bug fixes every day. While `\"stable\"` releases occur weekly and don't contain cutting-edge features from VSCode proposed APIs" | ||
349 | }, | ||
350 | "rust-analyzer.updates.askBeforeDownload": { | ||
351 | "type": "boolean", | ||
352 | "default": true, | ||
353 | "description": "Whether to ask for permission before downloading any files from the Internet" | ||
354 | }, | ||
355 | "rust-analyzer.serverPath": { | ||
356 | "type": [ | ||
357 | "null", | ||
358 | "string" | ||
359 | ], | ||
360 | "default": null, | ||
361 | "description": "Path to rust-analyzer executable (points to bundled binary by default). If this is set, then \"rust-analyzer.updates.channel\" setting is not used" | ||
362 | }, | ||
363 | "rust-analyzer.trace.server": { | ||
364 | "type": "string", | ||
365 | "scope": "window", | ||
366 | "enum": [ | ||
367 | "off", | ||
368 | "messages", | ||
369 | "verbose" | ||
370 | ], | ||
371 | "enumDescriptions": [ | ||
372 | "No traces", | ||
373 | "Error only", | ||
374 | "Full log" | ||
375 | ], | ||
376 | "default": "off", | ||
377 | "description": "Trace requests to the rust-analyzer" | ||
378 | }, | ||
379 | "rust-analyzer.trace.extension": { | ||
380 | "description": "Enable logging of VS Code extensions itself", | ||
381 | "type": "boolean", | ||
382 | "default": false | ||
378 | } | 383 | } |
379 | } | 384 | } |
380 | }, | 385 | }, |
@@ -411,6 +416,21 @@ | |||
411 | ] | 416 | ] |
412 | } | 417 | } |
413 | ], | 418 | ], |
419 | "languages": [ | ||
420 | { | ||
421 | "id": "ra_syntax_tree", | ||
422 | "extensions": [ | ||
423 | ".rast" | ||
424 | ] | ||
425 | } | ||
426 | ], | ||
427 | "grammars": [ | ||
428 | { | ||
429 | "language": "ra_syntax_tree", | ||
430 | "scopeName": "source.ra_syntax_tree", | ||
431 | "path": "ra_syntax_tree.tmGrammar.json" | ||
432 | } | ||
433 | ], | ||
414 | "problemMatchers": [ | 434 | "problemMatchers": [ |
415 | { | 435 | { |
416 | "name": "rustc", | 436 | "name": "rustc", |
@@ -450,6 +470,15 @@ | |||
450 | "light": "#747474", | 470 | "light": "#747474", |
451 | "highContrast": "#BEBEBE" | 471 | "highContrast": "#BEBEBE" |
452 | } | 472 | } |
473 | }, | ||
474 | { | ||
475 | "id": "rust_analyzer.syntaxTreeBorder", | ||
476 | "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)", | ||
477 | "defaults": { | ||
478 | "dark": "#ffffff", | ||
479 | "light": "#b700ff", | ||
480 | "highContrast": "#b700ff" | ||
481 | } | ||
453 | } | 482 | } |
454 | ], | 483 | ], |
455 | "semanticTokenTypes": [ | 484 | "semanticTokenTypes": [ |
@@ -492,65 +521,34 @@ | |||
492 | "description": "Style for unsafe operations" | 521 | "description": "Style for unsafe operations" |
493 | } | 522 | } |
494 | ], | 523 | ], |
495 | "semanticTokenStyleDefaults": [ | 524 | "semanticTokenScopes": [ |
496 | { | 525 | { |
497 | "selector": "attribute", | 526 | "language": "rust", |
498 | "scope": [ | 527 | "scopes": { |
499 | "meta.attribute" | 528 | "attribute": [ |
500 | ] | 529 | "meta.attribute" |
501 | }, | 530 | ], |
502 | { | 531 | "builtinType": [ |
503 | "selector": "builtinType", | 532 | "support.type.primitive" |
504 | "scope": [ | 533 | ], |
505 | "support.type.primitive" | 534 | "lifetime": [ |
506 | ] | 535 | "entity.name.lifetime.rust" |
507 | }, | 536 | ], |
508 | { | 537 | "typeAlias": [ |
509 | "selector": "lifetime", | 538 | "entity.name.typeAlias" |
510 | "scope": [ | 539 | ], |
511 | "entity.name.lifetime.rust" | 540 | "union": [ |
512 | ] | 541 | "entity.name.union" |
513 | }, | 542 | ], |
514 | { | 543 | "keyword.unsafe": [ |
515 | "selector": "typeAlias", | 544 | "keyword.other.unsafe" |
516 | "scope": [ | 545 | ], |
517 | "entity.name.typeAlias" | 546 | "keyword.control": [ |
518 | ] | 547 | "keyword.control" |
519 | }, | 548 | ], |
520 | { | 549 | "variable.constant": [ |
521 | "selector": "union", | 550 | "entity.name.constant" |
522 | "scope": [ | 551 | ] |
523 | "entity.name.union" | ||
524 | ] | ||
525 | }, | ||
526 | { | ||
527 | "selector": "keyword.unsafe", | ||
528 | "scope": [ | ||
529 | "keyword.other.unsafe" | ||
530 | ] | ||
531 | }, | ||
532 | { | ||
533 | "selector": "keyword.control", | ||
534 | "scope": [ | ||
535 | "keyword.control" | ||
536 | ] | ||
537 | }, | ||
538 | { | ||
539 | "selector": "variable.constant", | ||
540 | "scope": [ | ||
541 | "entity.name.constant" | ||
542 | ] | ||
543 | }, | ||
544 | { | ||
545 | "selector": "*.mutable", | ||
546 | "light": { | ||
547 | "fontStyle": "underline" | ||
548 | }, | ||
549 | "dark": { | ||
550 | "fontStyle": "underline" | ||
551 | }, | ||
552 | "highContrast": { | ||
553 | "fontStyle": "underline" | ||
554 | } | 552 | } |
555 | } | 553 | } |
556 | ] | 554 | ] |