diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 87 |
1 files changed, 62 insertions, 25 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index e484467b0..862de3210 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -155,11 +155,6 @@ | |||
155 | "when": "editorTextFocus && editorLangId == rust" | 155 | "when": "editorTextFocus && editorLangId == rust" |
156 | }, | 156 | }, |
157 | { | 157 | { |
158 | "command": "rust-analyzer.run", | ||
159 | "key": "ctrl+r", | ||
160 | "when": "editorTextFocus && editorLangId == rust" | ||
161 | }, | ||
162 | { | ||
163 | "command": "rust-analyzer.onEnter", | 158 | "command": "rust-analyzer.onEnter", |
164 | "key": "enter", | 159 | "key": "enter", |
165 | "when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust && !vim.active || vim.mode == 'Insert' && editorTextFocus && !suggestWidgetVisible && editorLangId == rust" | 160 | "when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust && !vim.active || vim.mode == 'Insert' && editorTextFocus && !suggestWidgetVisible && editorLangId == rust" |
@@ -405,24 +400,42 @@ | |||
405 | ], | 400 | ], |
406 | "semanticTokenTypes": [ | 401 | "semanticTokenTypes": [ |
407 | { | 402 | { |
408 | "id": "attribute" | 403 | "id": "attribute", |
404 | "description": "Style for attributes" | ||
405 | }, | ||
406 | { | ||
407 | "id": "builtinType", | ||
408 | "description": "Style for builtin types" | ||
409 | }, | 409 | }, |
410 | { | 410 | { |
411 | "id": "constant" | 411 | "id": "lifetime", |
412 | "description": "Style for lifetimes" | ||
413 | }, | ||
414 | { | ||
415 | "id": "typeAlias", | ||
416 | "description": "Style for type aliases" | ||
417 | }, | ||
418 | { | ||
419 | "id": "union", | ||
420 | "description": "Style for C-style untagged unions" | ||
412 | } | 421 | } |
413 | ], | 422 | ], |
414 | "semanticTokenModifiers": [ | 423 | "semanticTokenModifiers": [ |
415 | { | 424 | { |
416 | "id": "mutable" | 425 | "id": "constant", |
426 | "description": "Style for compile-time constants" | ||
417 | }, | 427 | }, |
418 | { | 428 | { |
419 | "id": "unsafe" | 429 | "id": "control", |
430 | "description": "Style for control flow keywords" | ||
420 | }, | 431 | }, |
421 | { | 432 | { |
422 | "id": "control" | 433 | "id": "mutable", |
434 | "description": "Style for mutable bindings" | ||
423 | }, | 435 | }, |
424 | { | 436 | { |
425 | "id": "builtin" | 437 | "id": "unsafe", |
438 | "description": "Style for unsafe operations" | ||
426 | } | 439 | } |
427 | ], | 440 | ], |
428 | "semanticTokenStyleDefaults": [ | 441 | "semanticTokenStyleDefaults": [ |
@@ -433,21 +446,27 @@ | |||
433 | ] | 446 | ] |
434 | }, | 447 | }, |
435 | { | 448 | { |
436 | "selector": "*.mutable", | 449 | "selector": "builtinType", |
437 | "light": { | 450 | "scope": [ |
438 | "fontStyle": "underline" | 451 | "support.type.primitive" |
439 | }, | 452 | ] |
440 | "dark": { | ||
441 | "fontStyle": "underline" | ||
442 | }, | ||
443 | "highContrast": { | ||
444 | "fontStyle": "underline" | ||
445 | } | ||
446 | }, | 453 | }, |
447 | { | 454 | { |
448 | "selector": "constant", | 455 | "selector": "lifetime", |
449 | "scope": [ | 456 | "scope": [ |
450 | "entity.name.constant" | 457 | "entity.name.lifetime.rust" |
458 | ] | ||
459 | }, | ||
460 | { | ||
461 | "selector": "typeAlias", | ||
462 | "scope": [ | ||
463 | "entity.name.typeAlias" | ||
464 | ] | ||
465 | }, | ||
466 | { | ||
467 | "selector": "union", | ||
468 | "scope": [ | ||
469 | "entity.name.union" | ||
451 | ] | 470 | ] |
452 | }, | 471 | }, |
453 | { | 472 | { |
@@ -457,10 +476,28 @@ | |||
457 | ] | 476 | ] |
458 | }, | 477 | }, |
459 | { | 478 | { |
460 | "selector": "type.builtin", | 479 | "selector": "keyword.control", |
480 | "scope": [ | ||
481 | "keyword.control" | ||
482 | ] | ||
483 | }, | ||
484 | { | ||
485 | "selector": "variable.constant", | ||
461 | "scope": [ | 486 | "scope": [ |
462 | "support.type.builtin" | 487 | "entity.name.constant" |
463 | ] | 488 | ] |
489 | }, | ||
490 | { | ||
491 | "selector": "*.mutable", | ||
492 | "light": { | ||
493 | "fontStyle": "underline" | ||
494 | }, | ||
495 | "dark": { | ||
496 | "fontStyle": "underline" | ||
497 | }, | ||
498 | "highContrast": { | ||
499 | "fontStyle": "underline" | ||
500 | } | ||
464 | } | 501 | } |
465 | ] | 502 | ] |
466 | } | 503 | } |