|
516 | 516 | "gitlens.advanced.menus": {
|
517 | 517 | "type": "object",
|
518 | 518 | "default": {
|
519 |
| - "explorerContext": { |
520 |
| - "fileDiff": true, |
521 |
| - "history": true, |
522 |
| - "remote": true |
523 |
| - }, |
524 | 519 | "editorContext": {
|
525 | 520 | "blame": true,
|
526 | 521 | "copy": true,
|
| 522 | + "details": true, |
527 | 523 | "fileDiff": true,
|
528 | 524 | "history": true,
|
529 | 525 | "lineDiff": true,
|
|
533 | 529 | "blame": true,
|
534 | 530 | "fileDiff": true,
|
535 | 531 | "history": true,
|
| 532 | + "remote": true, |
536 | 533 | "status": true
|
537 | 534 | },
|
538 | 535 | "editorTitleContext": {
|
539 | 536 | "blame": true,
|
540 | 537 | "fileDiff": true,
|
541 | 538 | "history": true,
|
542 | 539 | "remote": true
|
| 540 | + }, |
| 541 | + "explorerContext": { |
| 542 | + "fileDiff": true, |
| 543 | + "history": true, |
| 544 | + "remote": true |
543 | 545 | }
|
544 | 546 | },
|
545 | 547 | "description": "Specifies which commands will be added to which menus",
|
546 | 548 | "properties": {
|
547 |
| - "explorerContext": { |
548 |
| - "type": "object", |
549 |
| - "default": { |
550 |
| - "fileDiff": true, |
551 |
| - "history": true, |
552 |
| - "remote": true |
553 |
| - }, |
554 |
| - "properties": { |
555 |
| - "fileDiff": { |
556 |
| - "type": "boolean", |
557 |
| - "default": true |
558 |
| - }, |
559 |
| - "history": { |
560 |
| - "type": "boolean", |
561 |
| - "default": true |
562 |
| - }, |
563 |
| - "remote": { |
564 |
| - "type": "boolean", |
565 |
| - "default": true |
566 |
| - } |
567 |
| - } |
568 |
| - }, |
569 | 549 | "editorContext": {
|
570 | 550 | "type": "object",
|
571 | 551 | "default": {
|
572 | 552 | "blame": true,
|
573 | 553 | "copy": true,
|
| 554 | + "details": true, |
574 | 555 | "fileDiff": true,
|
575 | 556 | "history": true,
|
576 | 557 | "lineDiff": true,
|
|
613 | 594 | "blame": true,
|
614 | 595 | "fileDiff": true,
|
615 | 596 | "history": true,
|
| 597 | + "remote": true, |
616 | 598 | "status": true
|
617 | 599 | },
|
618 | 600 | "properties": {
|
|
628 | 610 | "type": "boolean",
|
629 | 611 | "default": true
|
630 | 612 | },
|
| 613 | + "remote": { |
| 614 | + "type": "boolean", |
| 615 | + "default": true |
| 616 | + }, |
631 | 617 | "status": {
|
632 | 618 | "type": "boolean",
|
633 | 619 | "default": true
|
|
660 | 646 | "default": true
|
661 | 647 | }
|
662 | 648 | }
|
| 649 | + }, |
| 650 | + "explorerContext": { |
| 651 | + "type": "object", |
| 652 | + "default": { |
| 653 | + "fileDiff": true, |
| 654 | + "history": true, |
| 655 | + "remote": true |
| 656 | + }, |
| 657 | + "properties": { |
| 658 | + "fileDiff": { |
| 659 | + "type": "boolean", |
| 660 | + "default": true |
| 661 | + }, |
| 662 | + "history": { |
| 663 | + "type": "boolean", |
| 664 | + "default": true |
| 665 | + }, |
| 666 | + "remote": { |
| 667 | + "type": "boolean", |
| 668 | + "default": true |
| 669 | + } |
| 670 | + } |
663 | 671 | }
|
664 | 672 | }
|
665 | 673 | },
|
|
977 | 985 | "when": "gitlens:enabled"
|
978 | 986 | }
|
979 | 987 | ],
|
980 |
| - "explorer/context": [ |
| 988 | + "editor/context": [ |
981 | 989 | {
|
982 | 990 | "command": "gitlens.openFileInRemote",
|
983 |
| - "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote", |
| 991 | + "when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote", |
984 | 992 | "group": "navigation@100"
|
985 | 993 | },
|
986 | 994 | {
|
987 |
| - "command": "gitlens.diffWithPrevious", |
988 |
| - "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff", |
| 995 | + "command": "gitlens.diffLineWithPrevious", |
| 996 | + "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff", |
989 | 997 | "group": "1_gitlens@1"
|
990 | 998 | },
|
991 | 999 | {
|
992 |
| - "command": "gitlens.diffWithWorking", |
993 |
| - "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff", |
| 1000 | + "command": "gitlens.diffLineWithWorking", |
| 1001 | + "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff", |
994 | 1002 | "group": "1_gitlens@2"
|
995 | 1003 | },
|
996 | 1004 | {
|
997 |
| - "command": "gitlens.showQuickFileHistory", |
998 |
| - "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history", |
| 1005 | + "command": "gitlens.showQuickCommitFileDetails", |
| 1006 | + "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details", |
| 1007 | + "group": "1_gitlens@3" |
| 1008 | + }, |
| 1009 | + { |
| 1010 | + "command": "gitlens.diffWithPrevious", |
| 1011 | + "when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff", |
999 | 1012 | "group": "1_gitlens_1@1"
|
| 1013 | + }, |
| 1014 | + { |
| 1015 | + "command": "gitlens.diffWithWorking", |
| 1016 | + "when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff", |
| 1017 | + "group": "1_gitlens_1@2" |
| 1018 | + }, |
| 1019 | + { |
| 1020 | + "command": "gitlens.showQuickFileHistory", |
| 1021 | + "when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history", |
| 1022 | + "group": "3_gitlens@1" |
| 1023 | + }, |
| 1024 | + { |
| 1025 | + "command": "gitlens.toggleFileBlame", |
| 1026 | + "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame", |
| 1027 | + "group": "3_gitlens@2" |
| 1028 | + }, |
| 1029 | + { |
| 1030 | + "command": "gitlens.copyShaToClipboard", |
| 1031 | + "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy", |
| 1032 | + "group": "9_gitlens@1" |
| 1033 | + }, |
| 1034 | + { |
| 1035 | + "command": "gitlens.copyMessageToClipboard", |
| 1036 | + "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy", |
| 1037 | + "group": "9_gitlens@2" |
1000 | 1038 | }
|
1001 | 1039 | ],
|
1002 | 1040 | "editor/title": [
|
|
1068 | 1106 | "group": "1_gitlens_2@2"
|
1069 | 1107 | }
|
1070 | 1108 | ],
|
1071 |
| - "editor/context": [ |
| 1109 | + "explorer/context": [ |
1072 | 1110 | {
|
1073 | 1111 | "command": "gitlens.openFileInRemote",
|
1074 |
| - "when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote", |
| 1112 | + "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote", |
1075 | 1113 | "group": "navigation@100"
|
1076 | 1114 | },
|
1077 |
| - { |
1078 |
| - "command": "gitlens.diffLineWithPrevious", |
1079 |
| - "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff", |
1080 |
| - "group": "1_gitlens@1" |
1081 |
| - }, |
1082 |
| - { |
1083 |
| - "command": "gitlens.diffLineWithWorking", |
1084 |
| - "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff", |
1085 |
| - "group": "1_gitlens@2" |
1086 |
| - }, |
1087 |
| - { |
1088 |
| - "command": "gitlens.showQuickCommitFileDetails", |
1089 |
| - "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details", |
1090 |
| - "group": "1_gitlens@3" |
1091 |
| - }, |
1092 | 1115 | {
|
1093 | 1116 | "command": "gitlens.diffWithPrevious",
|
1094 |
| - "when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff", |
1095 |
| - "group": "1_gitlens_1@1" |
| 1117 | + "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff", |
| 1118 | + "group": "1_gitlens@1" |
1096 | 1119 | },
|
1097 | 1120 | {
|
1098 | 1121 | "command": "gitlens.diffWithWorking",
|
1099 |
| - "when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff", |
1100 |
| - "group": "1_gitlens_1@2" |
| 1122 | + "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff", |
| 1123 | + "group": "1_gitlens@2" |
1101 | 1124 | },
|
1102 | 1125 | {
|
1103 | 1126 | "command": "gitlens.showQuickFileHistory",
|
1104 |
| - "when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history", |
1105 |
| - "group": "3_gitlens@1" |
1106 |
| - }, |
1107 |
| - { |
1108 |
| - "command": "gitlens.toggleFileBlame", |
1109 |
| - "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame", |
1110 |
| - "group": "3_gitlens@2" |
1111 |
| - }, |
1112 |
| - { |
1113 |
| - "command": "gitlens.copyShaToClipboard", |
1114 |
| - "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy", |
1115 |
| - "group": "9_gitlens@1" |
1116 |
| - }, |
1117 |
| - { |
1118 |
| - "command": "gitlens.copyMessageToClipboard", |
1119 |
| - "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy", |
1120 |
| - "group": "9_gitlens@2" |
| 1127 | + "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history", |
| 1128 | + "group": "1_gitlens_1@1" |
1121 | 1129 | }
|
1122 | 1130 | ]
|
1123 | 1131 | },
|
|
0 commit comments