Adds new CodeLens visibility & location settings

Adds new command to toggle CodeLens on and off when `gitlens.codeLens.visibility` is set to `ondemand`
This commit is contained in:
Eric Amodio
2016-09-19 21:28:52 -04:00
parent 14e9c5b4fa
commit 7b4dd77fbc
9 changed files with 200 additions and 63 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "gitlens",
"version": "0.2.0",
"version": "0.3.0",
"author": {
"name": "Eric Amodio",
"email": "eamodio@gmail.com"
@@ -45,28 +45,53 @@
"compact",
"expanded"
],
"description": "Specifies the style of the blame annotations. Compact - groups annotations to limit the repetition and also adds author and date when possible. Expanded - shows an annotation on every line"
"description": "Specifies the style of the blame annotations. `compact` - groups annotations to limit the repetition and also adds author and date when possible. `expanded` - shows an annotation on every line"
},
"gitlens.blame.annotation.sha": {
"type": "boolean",
"default": true,
"description": "Specifies whether the commit sha will be shown in the blame annotations. Applies only to the Expanded annotation style"
"description": "Specifies whether the commit sha will be shown in the blame annotations. Applies only to the `expanded` annotation style"
},
"gitlens.blame.annotation.author": {
"type": "boolean",
"default": true,
"description": "Specifies whether the committer will be shown in the blame annotations. Applies only to the Expanded annotation style"
"description": "Specifies whether the committer will be shown in the blame annotations. Applies only to the `expanded` annotation style"
},
"gitlens.blame.annotation.date": {
"type": "boolean",
"default": false,
"description": "Specifies whether the commit date will be shown in the blame annotations. Applies only to the Expanded annotation style"
"description": "Specifies whether the commit date will be shown in the blame annotations. Applies only to the `expanded` annotation style"
},
"gitlens.blame.annotation.useCodeActions": {
"type": "boolean",
"default": false,
"description": "Specifies whether code actions (Diff with Working, Diff with Previous) will be provided for the selected line, when annotating. Not required as context menu options are always provided"
},
"gitlens.codeLens.visibility": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"ondemand",
"off"
],
"description": "Specifies when CodeLens will be triggered in the active document. `auto` - automatically. `ondemand` - only when requested. `off` - disables all active document CodeLens"
},
"gitlens.codeLens.location": {
"type": "string",
"default": "document+containers",
"enum": [
"all",
"document+containers",
"document",
"custom"
],
"description": "Specifies where CodeLens will be rendered in the active document. `all` - render at the top of the document, on container-like (classes, modules, etc), and on member-like (methods, functions, properties, etc) lines. `document+containers` - render at the top of the document and on container-like lines. `document` - only render at the top of the document. `custom` - rendering controlled by `gitlens.codeLens.locationCustomSymbols`"
},
"gitlens.codeLens.locationCustomSymbols": {
"type": "array",
"description": "Specifies the set of document symbols to render active document CodeLens on. Must be a member of `SymbolKind`"
},
"gitlens.codeLens.recentChange.enabled": {
"type": "boolean",
"default": true,
@@ -80,7 +105,7 @@
"blame.explorer",
"git.history"
],
"description": "Specifies the command executed when the recent change CodeLens is clicked. Annotate - toggles blame annotations. Explorer - opens the blame explorer. History - opens a file history picker, which requires the Git History (git log) extension"
"description": "Specifies the command executed when the recent change CodeLens is clicked. `blame.annotate` - toggles blame annotations. `blame.explorer` - opens the blame explorer. `git.history` - opens a file history picker, which requires the Git History (git log) extension"
},
"gitlens.codeLens.authors.enabled": {
"type": "boolean",
@@ -95,7 +120,7 @@
"blame.explorer",
"git.history"
],
"description": "Specifies the command executed when the authors CodeLens is clicked. Annotate - toggles blame annotations. Explorer - opens the blame explorer. History - opens a file history picker, which requires the Git History (git log) extension"
"description": "Specifies the command executed when the authors CodeLens is clicked. `blame.annotate` - toggles blame annotations. `blame.explorer` - opens the blame explorer. `git.history` - opens a file history picker, which requires the Git History (git log) extension"
},
"gitlens.advanced.caching.enabled": {
"type": "boolean",
@@ -123,6 +148,11 @@
"command": "gitlens.toggleBlame",
"title": "Git: Toggle Blame",
"category": "GitLens"
},
{
"command": "gitlens.toggleCodeLens",
"title": "Git: Toggle CodeLens",
"category": "GitLens"
}],
"menus": {
"editor/title": [{
@@ -152,6 +182,12 @@
"key": "alt+b",
"mac": "alt+b",
"when": "editorTextFocus"
},
{
"command": "gitlens.toggleCodeLens",
"key": "alt+shift+b",
"mac": "alt+shift+b",
"when": "editorTextFocus"
}]
},
"activationEvents": [