Browse Source

Closes #1165 - Adds options to modify file annotation button behaviour

main
Raaj Patil 4 years ago
committed by Eric Amodio
parent
commit
ae6c87a055
2 changed files with 51 additions and 4 deletions
  1. +5
    -3
      README.md
  2. +46
    -1
      package.json

+ 5
- 3
README.md View File

@ -860,9 +860,11 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
## Menu & Toolbar Settings [#](#menu--toolbar-settings- 'Menu & Toolbar Settings')
| Name | Description |
| --------------- | ----------------------------------------------------- |
| `gitlens.menus` | Specifies which commands will be added to which menus |
| Name | Description |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `gitlens.menus` | Specifies which commands will be added to which menus |
| `gitlens.menus.annotations.behaviour` | Specifies whether the file annotations button in the editor title acts as a menu (default) or a toggle button |
| `gitlens.menus.annotations.toggleType` | Specifies whether the file annotations button toggles file blame, heatmap or changes (if behaviour is set to toggle) |
## Keyboard Shortcut Settings [#](#keyboard-shortcut-settings- 'Keyboard Shortcut Settings')

+ 46
- 1
package.json View File

@ -1136,6 +1136,36 @@
"markdownDescription": "Specifies which commands will be added to which menus",
"scope": "window"
},
"gitlens.menus.annotations.behaviour": {
"type": "string",
"default": "menu",
"enum": [
"menu",
"toggle"
],
"enumDescriptions": [
"Clicking the button opens up a menu with toggle options",
"Clicking the button toggles blame (default), heatmap or changes"
],
"markdownDescription": "Specifies whether the file annotations button in the editor title acts as a menu (default) or a toggle button",
"scope": "window"
},
"gitlens.menus.annotations.toggleType": {
"type": "string",
"default": "blame",
"enum": [
"blame",
"heatmap",
"changes"
],
"enumDescriptions": [
"Toggles file blame annotations",
"Toggles file heatmap annotations",
"Toggles file changes annotations"
],
"markdownDescription": "Specifies whether the file annotations button toggles file blame, heatmap or changes (if behaviour is set to toggle)",
"scope": "window"
},
"gitlens.mode.active": {
"type": "string",
"markdownDescription": "Specifies the active GitLens mode, if any",
@ -5684,8 +5714,23 @@
"group": "navigation@99"
},
{
"command": "gitlens.toggleFileBlame",
"when": "config.gitlens.menus.annotations.behaviour == toggle && config.gitlens.menus.annotations.toggleType == blame && gitlens:activeFileStatus =~ /blameable/ && !gitlens:annotationStatus && config.gitlens.menus.editorGroup.blame",
"group": "navigation@100"
},
{
"command": "gitlens.toggleFileHeatmap",
"when": "config.gitlens.menus.annotations.behaviour == toggle && config.gitlens.menus.annotations.toggleType == heatmap && gitlens:activeFileStatus =~ /blameable/ && !gitlens:annotationStatus && config.gitlens.menus.editorGroup.blame",
"group": "navigation@100"
},
{
"command": "gitlens.toggleFileChanges",
"when": "config.gitlens.menus.annotations.behaviour == toggle && config.gitlens.menus.annotations.toggleType == changes && gitlens:activeFileStatus =~ /blameable/ && !gitlens:annotationStatus && config.gitlens.menus.editorGroup.blame",
"group": "navigation@100"
},
{
"submenu": "gitlens/editor/annotations",
"when": "gitlens:activeFileStatus =~ /blameable/ && !gitlens:annotationStatus && config.gitlens.menus.editorGroup.blame",
"when": "config.gitlens.menus.annotations.behaviour == menu && gitlens:activeFileStatus =~ /blameable/ && !gitlens:annotationStatus && config.gitlens.menus.editorGroup.blame",
"group": "navigation@100"
},
{

Loading…
Cancel
Save