11 Commits

Author SHA1 Message Date
Eric Amodio
068b34b781 Adds settings migration support 2017-06-07 00:27:33 -04:00
Eric Amodio
5328e56230 Preps v4.0.0-beta 2017-06-06 17:01:01 -04:00
Eric Amodio
0fb718804e Anchors the code lens to the end of the line 2017-06-06 16:50:06 -04:00
Eric Amodio
516bcf7eef Updates dependencies 2017-06-06 13:29:50 -04:00
Eric Amodio
f9bbc9af0a Attempts to fix #80 - on line with link, annotation gets underlined 2017-06-06 13:29:38 -04:00
Eric Amodio
9cc96d4041 Fixes #81 - Current line annotation is too sticky 2017-06-06 13:27:54 -04:00
Eric Amodio
41785f6872 Adds better formatting of settings 2017-06-06 13:25:36 -04:00
Eric Amodio
f72ea0005c Updates screenshots 2017-06-06 02:45:39 -04:00
Eric Amodio
b3f0d19e48 Adds another screenshot to README 2017-06-06 02:37:40 -04:00
Eric Amodio
60702ff314 Adds vscode issue TODO 2017-06-06 02:29:22 -04:00
Eric Amodio
b72d22032c Adds more screenshots to README 2017-06-06 02:28:40 -04:00
16 changed files with 724 additions and 577 deletions

View File

@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## [4.0.0-alpha.2] - 2017-06-05 ## [4.0.0-beta] - 2017-06-06
### Added ### Added
- Adds all-new, beautiful, highly customizable and themeable, file blame annotations - Adds all-new, beautiful, highly customizable and themeable, file blame annotations
- Can now fully customize the [layout and content](https://github.com/eamodio/vscode-gitlens/blob/develop/README.md#file-blame-annotation-settings), as well as the [theme](https://github.com/eamodio/vscode-gitlens/blob/develop/README.md#theme-settings) - Can now fully customize the [layout and content](https://github.com/eamodio/vscode-gitlens/blob/develop/README.md#file-blame-annotation-settings), as well as the [theme](https://github.com/eamodio/vscode-gitlens/blob/develop/README.md#theme-settings)
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed ### Changed
- (BREAKING) Almost all of the GitLens settings have either been renamed, removed, or otherwise changed - see the [README](https://github.com/eamodio/vscode-gitlens/blob/develop/README.md#extension-settings)` - (BREAKING) Almost all of the GitLens settings have either been renamed, removed, or otherwise changed - see the [README](https://github.com/eamodio/vscode-gitlens/blob/develop/README.md#extension-settings)`
- Changes the positioning of the Git code lens to try to be at the end of any other code lens on the same line
- Changes the position of the `Open File in Remote` command (`gitlens.openFileInRemote`) in the context menus - now in the `navigation` group - Changes the position of the `Open File in Remote` command (`gitlens.openFileInRemote`) in the context menus - now in the `navigation` group
- Changes the `Toggle Git Code Lens` command (`gitlens.toggleCodeLens`) to always toggle the Git code lens on and off - Changes the `Toggle Git Code Lens` command (`gitlens.toggleCodeLens`) to always toggle the Git code lens on and off
@@ -32,6 +33,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Removes `Toggle Blame Annotations` command (`gitlens.toggleBlame`) - replaced by the `Toggle File Blame Annotations` command (`gitlens.toggleFileBlame`) - Removes `Toggle Blame Annotations` command (`gitlens.toggleBlame`) - replaced by the `Toggle File Blame Annotations` command (`gitlens.toggleFileBlame`)
- Removes `Show Blame Annotations` command (`gitlens.showBlame`) - replaced by the `Show File Blame Annotations` command (`gitlens.showFileBlame`) - Removes `Show Blame Annotations` command (`gitlens.showBlame`) - replaced by the `Show File Blame Annotations` command (`gitlens.showFileBlame`)
### Fixed
- Fixes [#81](https://github.com/eamodio/vscode-gitlens/issues/81) - Current line annotation feels too sticky
## [3.6.0] - 2017-06-02 ## [3.6.0] - 2017-06-02
### Added ### Added
- Adds diff information (the line's previous version) into the active line hover - Adds diff information (the line's previous version) into the active line hover

View File

@@ -11,26 +11,34 @@ GitLens provides an unobtrusive blame annotation at the end of the current line,
## Previews ## Previews
#### Featuring code lens, file blame annotations, and navigation and exploration via quick pick menus #### Featuring code lens, file blame annotations, and navigation and exploration via quick pick menus
![GitLens preview 1](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/gitlens-preview1.gif) ![GitLens preview 1](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/gitlens-preview1.gif)
#### Featuring current line blame annotation and hovers, status bar commit details, quick pick menus, compare with previous, and more #### Featuring current line blame annotation and hovers, status bar commit details, quick pick menus, compare with previous, and more
![GitLens preview 2](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/gitlens-preview2.gif) ![GitLens preview 2](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/gitlens-preview2.gif)
## Features ## Features
#### Git Blame Annotations #### Git Blame Annotations
- Adds an unobtrusive, highly [customizable](#line-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotation** to the end of the current line ([optional](#line-blame-annotation-settings), on by default) - Adds an unobtrusive, highly [customizable](#line-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotation** to the end of the current line ([optional](#line-blame-annotation-settings), on by default)
![Line Blame Annotation](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/screenshot-line-blame-annotation.png)
- Contains the author, date, and message of the line's most recent commit, by [default](#line-blame-annotation-settings) - Contains the author, date, and message of the line's most recent commit, by [default](#line-blame-annotation-settings)
- Also adds a `details` hover annotation to the current line annotation which provides more commit details ([optional](#line-blame-annotation-settings), on by default) - Also adds a `details` hover annotation to the current line annotation which provides more commit details ([optional](#line-blame-annotation-settings), on by default)
- Also adds a `changes` (diff) hover annotation to the current line annotation which provides **instant** access to the line's previous version ([optional](#line-blame-annotation-settings), on by default) - Also adds a `changes` (diff) hover annotation to the current line annotation which provides **instant** access to the line's previous version ([optional](#line-blame-annotation-settings), on by default)
![Line Blame Annotations](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/screenshot-line-blame-annotations.png)
- Adds on-demand, beautiful, highly [customizable](#file-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotations** of the whole file - Adds on-demand, beautiful, highly [customizable](#file-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotations** of the whole file
![File Blame Annotation](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/screenshot-file-blame-annotations.png)
- Choose between `gutter` (default) and `hover` [annotation styles](#file-blame-annotation-settings) - Choose between `gutter` (default) and `hover` [annotation styles](#file-blame-annotation-settings)
- Contains the commit message and date, by [default](#file-blame-annotation-settings) - Contains the commit message and date, by [default](#file-blame-annotation-settings)
- Also adds a `details` hover annotation to the line's annotation which provides more commit details ([optional](#file-blame-annotation-settings), on by default) - Also adds a `details` hover annotation to the line's annotation which provides more commit details ([optional](#file-blame-annotation-settings), on by default)
- Adds [customizable](#status-bar-settings) **blame information** about the current line to the **status bar** ([optional](#status-bar-settings), on by default) - Adds [customizable](#status-bar-settings) **blame information** about the current line to the **status bar** ([optional](#status-bar-settings), on by default)
![Status Bar Blame](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/screenshot-status-bar.png)
- Contains the commit author and date, by [default](#status-bar-settings) - Contains the commit author and date, by [default](#status-bar-settings)
- Clicking the status bar item will, by [default](#status-bar-settings), show a **commit details quick pick menu** with commands for comparing, navigating and exploring commits, and more - Clicking the status bar item will, by [default](#status-bar-settings), show a **commit details quick pick menu** with commands for comparing, navigating and exploring commits, and more
- Provides [customizable](#status-bar-settings) click behavior — choose between one of the following - Provides [customizable](#status-bar-settings) click behavior — choose between one of the following
@@ -52,6 +60,8 @@ GitLens provides an unobtrusive blame annotation at the end of the current line,
#### Git Code Lens #### Git Code Lens
- Adds **code lens** to the top of the file and on code blocks ([optional](#code-lens-settings), on by default) - Adds **code lens** to the top of the file and on code blocks ([optional](#code-lens-settings), on by default)
![Git Code Lens](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/develop/images/screenshot-code-lens.png)
- **Recent Change** — author and date of the most recent commit for the file or code block - **Recent Change** — author and date of the most recent commit for the file or code block
- Clicking the code lens will, by [default](#code-lens-settings), show a **commit file details quick pick menu** with commands for comparing, navigating and exploring commits, and more - Clicking the code lens will, by [default](#code-lens-settings), show a **commit file details quick pick menu** with commands for comparing, navigating and exploring commits, and more
- **Authors** — number of authors of the file or code block and the most prominent author (if there is more than one) - **Authors** — number of authors of the file or code block and the most prominent author (if there is more than one)
@@ -211,14 +221,14 @@ GitLens is highly customizable and provides many configuration settings to allow
|Name | Description |Name | Description
|-----|------------ |-----|------------
|`gitlens.blame.file.annotationType`|Specifies the type of blame annotations that will be shown for the current file. `gutter` - adds an annotation to the beginning of each line. `hover` - shows annotations when hovering over each line |`gitlens.blame.file.annotationType`|Specifies the type of blame annotations that will be shown for the current file<br />`gutter` - adds an annotation to the beginning of each line<br />`hover` - shows annotations when hovering over each line
|`gitlens.blame.file.lineHighlight.enabled`|Specifies whether or not to highlight lines associated with the current line |`gitlens.blame.file.lineHighlight.enabled`|Specifies whether or not to highlight lines associated with the current line
|`gitlens.blame.file.lineHighlight.locations`|Specifies where the associated line highlights will be shown. `gutter` - adds a gutter glyph. `line` - adds a full-line highlight background color. `overviewRuler` - adds a decoration to the overviewRuler (scroll bar) |`gitlens.blame.file.lineHighlight.locations`|Specifies where the associated line highlights will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
|`gitlens.annotations.file.gutter.format`|Specifies the format of the gutter blame annotations. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.annotations.file.dateFormat`), `${authorAgo}` - commit author, relative commit date |`gitlens.annotations.file.gutter.format`|Specifies the format of the gutter blame annotations<br />Available tokens<br />`${id}` - commit id<br />`${author}` - commit author<br />`${message}` - commit message<br />`${ago}` - relative commit date (e.g. 1 day ago)<br />`${date}` - formatted commit date (format specified by `gitlens.annotations.file.gutter.dateFormat`)<br />`${authorAgo}` - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|`gitlens.annotations.file.gutter.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in gutter blame annotations. See https://momentjs.com/docs/#/displaying/format/ for valid formats |`gitlens.annotations.file.gutter.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in gutter blame annotations<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|`gitlens.annotations.file.gutter.compact`|Specifies whether or not to compact (deduplicate) matching adjacent gutter blame annotations |`gitlens.annotations.file.gutter.compact`|Specifies whether or not to compact (deduplicate) matching adjacent gutter blame annotations
|`gitlens.annotations.file.gutter.heatmap.enabled`|Specifies whether or not to provide a heatmap indicator in the gutter blame annotations |`gitlens.annotations.file.gutter.heatmap.enabled`|Specifies whether or not to provide a heatmap indicator in the gutter blame annotations
|`gitlens.annotations.file.gutter.heatmap.location`|Specifies where the heatmap indicators will be shown in the gutter blame annotations. `left` - adds a heatmap indicator on the left edge of the gutter blame annotations. `right` - adds a heatmap indicator on the right edge of the gutter blame annotations |`gitlens.annotations.file.gutter.heatmap.location`|Specifies where the heatmap indicators will be shown in the gutter blame annotations<br />`left` - adds a heatmap indicator on the left edge of the gutter blame annotations<br />`right` - adds a heatmap indicator on the right edge of the gutter blame annotations
|`gitlens.annotations.file.gutter.hover.details`|Specifies whether or not to provide a commit details hover annotation over the gutter blame annotations |`gitlens.annotations.file.gutter.hover.details`|Specifies whether or not to provide a commit details hover annotation over the gutter blame annotations
|`gitlens.annotations.file.gutter.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line |`gitlens.annotations.file.gutter.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|`gitlens.annotations.file.hover.heatmap.enabled`|Specifies whether or not to provide heatmap indicators on the left edge of each line |`gitlens.annotations.file.hover.heatmap.enabled`|Specifies whether or not to provide heatmap indicators on the left edge of each line
@@ -229,9 +239,9 @@ GitLens is highly customizable and provides many configuration settings to allow
|Name | Description |Name | Description
|-----|------------ |-----|------------
|`gitlens.blame.line.enabled`|Specifies whether or not to provide a blame annotation for the current line |`gitlens.blame.line.enabled`|Specifies whether or not to provide a blame annotation for the current line
|`gitlens.blame.line.annotationType`|Specifies the type of blame annotations that will be shown for the current line. `trailing` - adds an annotation to the end of the current line. `hover` - shows annotations when hovering over the current line |`gitlens.blame.line.annotationType`|Specifies the type of blame annotations that will be shown for the current line<br />`trailing` - adds an annotation to the end of the current line<br />`hover` - shows annotations when hovering over the current line
|`gitlens.annotations.line.trailing.format`|Specifies the format of the trailing blame annotations. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.annotations.currentLine.dateFormat`), `${authorAgo}` - commit author, relative commit date |`gitlens.annotations.line.trailing.format`|Specifies the format of the trailing blame annotations<br />Available tokens<br />`${id}` - commit id<br />`${author}` - commit author<br />`${message}` - commit message<br />`${ago}` - relative commit date (e.g. 1 day ago)<br />`${date}` - formatted commit date (format specified by `gitlens.annotations.line.trailing.dateFormat`)<br />`${authorAgo}` - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|`gitlens.annotations.line.trailing.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in trailing blame annotations. See https://momentjs.com/docs/#/displaying/format/ for valid formats |`gitlens.annotations.line.trailing.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in trailing blame annotations<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|`gitlens.annotations.line.trailing.hover.details`|Specifies whether or not to provide a commit details hover annotation over the trailing blame annotations |`gitlens.annotations.line.trailing.hover.details`|Specifies whether or not to provide a commit details hover annotation over the trailing blame annotations
|`gitlens.annotations.line.trailing.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation over the trailing blame annotations |`gitlens.annotations.line.trailing.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation over the trailing blame annotations
|`gitlens.annotations.line.trailing.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line |`gitlens.annotations.line.trailing.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
@@ -244,10 +254,10 @@ GitLens is highly customizable and provides many configuration settings to allow
|-----|------------ |-----|------------
|`gitlens.codeLens.enabled`|Specifies whether or not to provide any Git code lens |`gitlens.codeLens.enabled`|Specifies whether or not to provide any Git code lens
|`gitlens.codeLens.recentChange.enabled`|Specifies whether or not to show a `recent change` code lens showing the author and date of the most recent commit for the file or code block |`gitlens.codeLens.recentChange.enabled`|Specifies whether or not to show a `recent change` code lens showing the author and date of the most recent commit for the file or code block
|`gitlens.codeLens.recentChange.command`|Specifies the command to be executed when the `recent change` code lens is clicked. `gitlens.toggleFileBlame` - toggles file blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current committed file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick |`gitlens.codeLens.recentChange.command`|Specifies the command to be executed when the `recent change` code lens is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current committed file with the previous commit<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|`gitlens.codeLens.authors.enabled`|Specifies whether or not to show an `authors` code lens showing number of authors of the file or code block and the most prominent author (if there is more than one) |`gitlens.codeLens.authors.enabled`|Specifies whether or not to show an `authors` code lens showing number of authors of the file or code block and the most prominent author (if there is more than one)
|`gitlens.codeLens.authors.command`|Specifies the command to be executed when the `authors` code lens is clicked. `gitlens.toggleFileBlame` - toggles file blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current committed file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick |`gitlens.codeLens.authors.command`|Specifies the command to be executed when the `authors` code lens is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current committed file with the previous commit<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|`gitlens.codeLens.locations`|Specifies where Git code lens will be shown in the document. `document` - adds code lens at the top of the document. `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc). `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines. `custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols` |`gitlens.codeLens.locations`|Specifies where Git code lens will be shown in the document<br />`document` - adds code lens at the top of the document<br />`containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)<br />`blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines<br />`custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`
|`gitlens.codeLens.customLocationSymbols`|Specifies the set of document symbols where Git code lens will be shown in the document |`gitlens.codeLens.customLocationSymbols`|Specifies the set of document symbols where Git code lens will be shown in the document
|`gitlens.codeLens.perLanguageLocations`|Specifies where Git code lens will be shown in the document for the specified languages |`gitlens.codeLens.perLanguageLocations`|Specifies where Git code lens will be shown in the document for the specified languages
@@ -256,11 +266,10 @@ GitLens is highly customizable and provides many configuration settings to allow
|Name | Description |Name | Description
|-----|------------ |-----|------------
|`gitlens.statusBar.enabled`|Specifies whether or not to provide blame information on the status bar |`gitlens.statusBar.enabled`|Specifies whether or not to provide blame information on the status bar
|`gitlens.statusBar.alignment`|Specifies the blame alignment in the status bar. `left` - align to the left, `right` - align to the right |`gitlens.statusBar.alignment`|Specifies the blame alignment in the status bar<br />`left` - align to the left, `right` - align to the right
|`gitlens.statusBar.format`|Specifies the format of the blame information on the status bar. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.statusBar.dateFormat`) |`gitlens.statusBar.command`|Specifies the command to be executed when the blame status bar item is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current line commit with the previous<br />`gitlens.diffWithWorking` - compares the current line commit with the working tree<br />`gitlens.toggleCodeLens` - toggles Git code lens<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|`gitlens.statusBar.command`|Specifies the command to be executed when the blame status bar item is clicked. `gitlens.toggleFileBlame` - toggles file blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current line commit with the previous. `gitlens.diffWithWorking` - compares the current line commit with the working tree. `gitlens.toggleCodeLens` - toggles Git code lens. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick |`gitlens.statusBar.format`|Specifies the format of the blame information on the status bar<br />Available tokens<br />`${id}` - commit id<br />`${author}` - commit author<br />`${message}` - commit message<br />`${ago}` - relative commit date (e.g. 1 day ago)<br />`${date}` - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|`gitlens.statusBar.format`|Specifies the format of the status bar blame information. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.statusBar.dateFormat`), `${authorAgo}` - commit author, relative commit date |`gitlens.statusBar.dateFormat`|Specifies the date format of absolute dates shown in the blame information on the status bar<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|`gitlens.statusBar.dateFormat`|Specifies the date format of absolute dates shown in the blame information on the status bar. See https://momentjs.com/docs/#/displaying/format/ for valid formats
### Theme Settings ### Theme Settings

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

14
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "gitlens", "name": "gitlens",
"version": "4.0.0-alpha.2", "version": "4.0.0-beta",
"lockfileVersion": 1, "lockfileVersion": 1,
"dependencies": { "dependencies": {
"@types/applicationinsights": { "@types/applicationinsights": {
@@ -28,9 +28,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "7.0.27", "version": "7.0.28",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.27.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.28.tgz",
"integrity": "sha512-2QMiuVOEye2yKmMwE1V96C9HSShmT0WSm6dv2WjacvePEjQNNJGAerTO5hdYhj5lpdK5MW+FVxmyzDhr4omIdw==", "integrity": "sha512-9rLhvgupMpC7Yh24yB8zj+4L6SZ9BYUwqknEC8+R7gqCg3KL65UHg7yu9X6J8mSmmtVr1Hbey564yZ3C9nXqtQ==",
"dev": true "dev": true
}, },
"@types/tmp": { "@types/tmp": {
@@ -1784,9 +1784,9 @@
"dev": true "dev": true
}, },
"tslint": { "tslint": {
"version": "5.4.2", "version": "5.4.3",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.4.2.tgz", "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.4.3.tgz",
"integrity": "sha1-YJtmQMwEJPSjlamt9ow3VWPFScc=", "integrity": "sha1-dhyEArgONHt3M6BDkKdXslNYBGc=",
"dev": true "dev": true
}, },
"tsutils": { "tsutils": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "gitlens", "name": "gitlens",
"version": "4.0.0-alpha.2", "version": "4.0.0-beta",
"author": { "author": {
"name": "Eric Amodio", "name": "Eric Amodio",
"email": "eamodio@gmail.com" "email": "eamodio@gmail.com"
@@ -76,12 +76,12 @@
"gitlens.annotations.file.gutter.format": { "gitlens.annotations.file.gutter.format": {
"type": "string", "type": "string",
"default": "${message|40?} ${ago|14-}", "default": "${message|40?} ${ago|14-}",
"description": "Specifies the format of the gutter blame annotations. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.annotations.file.dateFormat`), `${authorAgo}` - commit author, relative commit date" "description": "Specifies the format of the gutter blame annotations\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.annotations.file.gutter.dateFormat`)\n ${authorAgo} - commit author, relative commit date\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting"
}, },
"gitlens.annotations.file.gutter.dateFormat": { "gitlens.annotations.file.gutter.dateFormat": {
"type": "string", "type": "string",
"default": null, "default": null,
"description": "Specifies how to format absolute dates (using the `${date}` token) in gutter blame annotations. See https://momentjs.com/docs/#/displaying/format/ for valid formats" "description": "Specifies how to format absolute dates (using the `${date}` token) in gutter blame annotations\nSee https://momentjs.com/docs/#/displaying/format/ for valid formats"
}, },
"gitlens.annotations.file.gutter.compact": { "gitlens.annotations.file.gutter.compact": {
"type": "boolean", "type": "boolean",
@@ -100,7 +100,7 @@
"left", "left",
"right" "right"
], ],
"description": "Specifies where the heatmap indicators will be shown in the gutter blame annotations. `left` - adds a heatmap indicator on the left edge of the gutter blame annotations. `right` - adds a heatmap indicator on the right edge of the gutter blame annotations" "description": "Specifies where the heatmap indicators will be shown in the gutter blame annotations\n `left` - adds a heatmap indicator on the left edge of the gutter blame annotations\n `right` - adds a heatmap indicator on the right edge of the gutter blame annotations"
}, },
"gitlens.annotations.file.gutter.hover.details": { "gitlens.annotations.file.gutter.hover.details": {
"type": "boolean", "type": "boolean",
@@ -135,12 +135,12 @@
"gitlens.annotations.line.trailing.format": { "gitlens.annotations.line.trailing.format": {
"type": "string", "type": "string",
"default": "${authorAgo} \u2022 ${message}", "default": "${authorAgo} \u2022 ${message}",
"description": "Specifies the format of the trailing blame annotations. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.annotations.currentLine.dateFormat`), `${authorAgo}` - commit author, relative commit date" "description": "Specifies the format of the trailing blame annotations\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.annotations.line.trailing.dateFormat`)\n ${authorAgo} - commit author, relative commit date\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting"
}, },
"gitlens.annotations.line.trailing.dateFormat": { "gitlens.annotations.line.trailing.dateFormat": {
"type": "string", "type": "string",
"default": null, "default": null,
"description": "Specifies how to format absolute dates (using the `${date}` token) in trailing blame annotations. See https://momentjs.com/docs/#/displaying/format/ for valid formats" "description": "Specifies how to format absolute dates (using the `${date}` token) in trailing blame annotations\nSee https://momentjs.com/docs/#/displaying/format/ for valid formats"
}, },
"gitlens.annotations.line.trailing.hover.details": { "gitlens.annotations.line.trailing.hover.details": {
"type": "boolean", "type": "boolean",
@@ -164,7 +164,7 @@
"gutter", "gutter",
"hover" "hover"
], ],
"description": "Specifies the type of blame annotations that will be shown for the current file. `gutter` - adds an annotation to the beginning of each line. `hover` - shows annotations when hovering over each line" "description": "Specifies the type of blame annotations that will be shown for the current file\n `gutter` - adds an annotation to the beginning of each line\n `hover` - shows annotations when hovering over each line"
}, },
"gitlens.blame.file.lineHighlight.enabled": { "gitlens.blame.file.lineHighlight.enabled": {
"type": "boolean", "type": "boolean",
@@ -189,7 +189,7 @@
"minItems": 1, "minItems": 1,
"maxItems": 3, "maxItems": 3,
"uniqueItems": true, "uniqueItems": true,
"description": "Specifies where the associated line highlights will be shown. `gutter` - adds a gutter glyph. `line` - adds a full-line highlight background color. `overviewRuler` - adds a decoration to the overviewRuler (scroll bar)" "description": "Specifies where the associated line highlights will be shown\n `gutter` - adds a gutter glyph\n `line` - adds a full-line highlight background color\n `overviewRuler` - adds a decoration to the overviewRuler (scroll bar)"
}, },
"gitlens.blame.line.enabled": { "gitlens.blame.line.enabled": {
"type": "boolean", "type": "boolean",
@@ -203,7 +203,7 @@
"trailing", "trailing",
"hover" "hover"
], ],
"description": "Specifies the type of blame annotations that will be shown for the current line. `trailing` - adds an annotation to the end of the current line. `hover` - shows annotations when hovering over the current line" "description": "Specifies the type of blame annotations that will be shown for the current line\n `trailing` - adds an annotation to the end of the current line\n `hover` - shows annotations when hovering over the current line"
}, },
"gitlens.codeLens.enabled": { "gitlens.codeLens.enabled": {
"type": "boolean", "type": "boolean",
@@ -228,7 +228,7 @@
"gitlens.showQuickFileHistory", "gitlens.showQuickFileHistory",
"gitlens.showQuickRepoHistory" "gitlens.showQuickRepoHistory"
], ],
"description": "Specifies the command to be executed when the `recent change` code lens is clicked. `gitlens.toggleFileBlame` - toggles file blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current committed file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick" "description": "Specifies the command to be executed when the `recent change` code lens is clicked\n `gitlens.toggleFileBlame` - toggles file blame annotations\n `gitlens.showBlameHistory` - opens the blame history explorer\n `gitlens.showFileHistory` - opens the file history explorer\n `gitlens.diffWithPrevious` - compares the current committed file with the previous commit\n `gitlens.showQuickCommitDetails` - shows a commit details quick pick\n `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick\n `gitlens.showQuickFileHistory` - shows a file history quick pick\n `gitlens.showQuickRepoHistory` - shows a branch history quick pick"
}, },
"gitlens.codeLens.authors.enabled": { "gitlens.codeLens.authors.enabled": {
"type": "boolean", "type": "boolean",
@@ -248,7 +248,7 @@
"gitlens.showQuickFileHistory", "gitlens.showQuickFileHistory",
"gitlens.showQuickRepoHistory" "gitlens.showQuickRepoHistory"
], ],
"description": "Specifies the command to be executed when the `authors` code lens is clicked. `gitlens.toggleFileBlame` - toggles file blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current committed file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick" "description": "Specifies the command to be executed when the `authors` code lens is clicked\n `gitlens.toggleFileBlame` - toggles file blame annotations\n `gitlens.showBlameHistory` - opens the blame history explorer\n `gitlens.showFileHistory` - opens the file history explorer\n `gitlens.diffWithPrevious` - compares the current committed file with the previous commit\n `gitlens.showQuickCommitDetails` - shows a commit details quick pick\n `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick\n `gitlens.showQuickFileHistory` - shows a file history quick pick\n `gitlens.showQuickRepoHistory` - shows a branch history quick pick"
}, },
"gitlens.codeLens.locations": { "gitlens.codeLens.locations": {
"type": "array", "type": "array",
@@ -268,7 +268,7 @@
"minItems": 1, "minItems": 1,
"maxItems": 4, "maxItems": 4,
"uniqueItems": true, "uniqueItems": true,
"description": "Specifies where Git code lens will be shown in the document. `document` - adds code lens at the top of the document. `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc). `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines. `custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`" "description": "Specifies where Git code lens will be shown in the document\n `document` - adds code lens at the top of the document\n `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)\n `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines\n `custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`"
}, },
"gitlens.codeLens.customLocationSymbols": { "gitlens.codeLens.customLocationSymbols": {
"type": "array", "type": "array",
@@ -276,7 +276,7 @@
"type": "string" "type": "string"
}, },
"uniqueItems": true, "uniqueItems": true,
"description": "Specifies the set of document symbols where Git code lens will be shown in the document. Must be a member of `SymbolKind`" "description": "Specifies the set of document symbols where Git code lens will be shown in the document\nMust be a member of `SymbolKind`"
}, },
"gitlens.codeLens.perLanguageLocations": { "gitlens.codeLens.perLanguageLocations": {
"type": "array", "type": "array",
@@ -347,7 +347,7 @@
"minItems": 1, "minItems": 1,
"maxItems": 4, "maxItems": 4,
"uniqueItems": true, "uniqueItems": true,
"description": "Specifies where Git code lens will be shown in the document for the specified language. `document` - adds code lens at the top of the document. `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc). `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines. `custom` - adds code lens at the start of symbols contained in `customSymbols`" "description": "Specifies where Git code lens will be shown in the document for the specified language\n `document` - adds code lens at the top of the document\n `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)\n `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines\n `custom` - adds code lens at the start of symbols contained in `customSymbols`"
}, },
"customSymbols": { "customSymbols": {
"type": "array", "type": "array",
@@ -355,7 +355,7 @@
"type": "string" "type": "string"
}, },
"uniqueItems": true, "uniqueItems": true,
"description": "Specifies the set of document symbols where Git code lens will be shown in the document for the specified language. Must be a member of `SymbolKind`" "description": "Specifies the set of document symbols where Git code lens will be shown in the document for the specified language\nMust be a member of `SymbolKind`"
} }
} }
}, },
@@ -379,7 +379,7 @@
"left", "left",
"right" "right"
], ],
"description": "Specifies the blame alignment in the status bar. `left` - align to the left, `right` - align to the right" "description": "Specifies the blame alignment in the status bar\n `left` - align to the left\n `right` - align to the right"
}, },
"gitlens.statusBar.command": { "gitlens.statusBar.command": {
"type": "string", "type": "string",
@@ -396,12 +396,12 @@
"gitlens.showQuickFileHistory", "gitlens.showQuickFileHistory",
"gitlens.showQuickRepoHistory" "gitlens.showQuickRepoHistory"
], ],
"description": "Specifies the command to be executed when the blame status bar item is clicked. `gitlens.toggleFileBlame` - toggles file blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current line commit with the previous. `gitlens.diffWithWorking` - compares the current line commit with the working tree. `gitlens.toggleCodeLens` - toggles Git code lens. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick" "description": "Specifies the command to be executed when the blame status bar item is clicked\n `gitlens.toggleFileBlame` - toggles file blame annotations\n `gitlens.showBlameHistory` - opens the blame history explorer\n `gitlens.showFileHistory` - opens the file history explorer\n `gitlens.diffWithPrevious` - compares the current line commit with the previous\n `gitlens.diffWithWorking` - compares the current line commit with the working tree\n `gitlens.toggleCodeLens` - toggles Git code lens\n `gitlens.showQuickCommitDetails` - shows a commit details quick pick\n `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick\n `gitlens.showQuickFileHistory` - shows a file history quick pick\n `gitlens.showQuickRepoHistory` - shows a branch history quick pick"
}, },
"gitlens.statusBar.format": { "gitlens.statusBar.format": {
"type": "string", "type": "string",
"default": "${authorAgo}", "default": "${authorAgo}",
"description": "Specifies the format of the status bar blame information. Available tokens: `${id}` - commit id, `${author}` - commit author, `${message}` - commit message, `${ago}` - relative commit date (e.g. 1 day ago), `${date}` - formatted commit date (format specified by `gitlens.statusBar.dateFormat`), `${authorAgo}` - commit author, relative commit date" "description": "Specifies the format of the status bar blame information\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)\n ${authorAgo} - commit author, relative commit date\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting"
}, },
"gitlens.statusBar.dateFormat": { "gitlens.statusBar.dateFormat": {
"type": "string", "type": "string",
@@ -516,14 +516,10 @@
"gitlens.advanced.menus": { "gitlens.advanced.menus": {
"type": "object", "type": "object",
"default": { "default": {
"explorerContext": {
"fileDiff": true,
"history": true,
"remote": true
},
"editorContext": { "editorContext": {
"blame": true, "blame": true,
"copy": true, "copy": true,
"details": true,
"fileDiff": true, "fileDiff": true,
"history": true, "history": true,
"lineDiff": true, "lineDiff": true,
@@ -533,6 +529,7 @@
"blame": true, "blame": true,
"fileDiff": true, "fileDiff": true,
"history": true, "history": true,
"remote": true,
"status": true "status": true
}, },
"editorTitleContext": { "editorTitleContext": {
@@ -540,37 +537,21 @@
"fileDiff": true, "fileDiff": true,
"history": true, "history": true,
"remote": true "remote": true
},
"explorerContext": {
"fileDiff": true,
"history": true,
"remote": true
} }
}, },
"description": "Specifies which commands will be added to which menus", "description": "Specifies which commands will be added to which menus",
"properties": { "properties": {
"explorerContext": {
"type": "object",
"default": {
"fileDiff": true,
"history": true,
"remote": true
},
"properties": {
"fileDiff": {
"type": "boolean",
"default": true
},
"history": {
"type": "boolean",
"default": true
},
"remote": {
"type": "boolean",
"default": true
}
}
},
"editorContext": { "editorContext": {
"type": "object", "type": "object",
"default": { "default": {
"blame": true, "blame": true,
"copy": true, "copy": true,
"details": true,
"fileDiff": true, "fileDiff": true,
"history": true, "history": true,
"lineDiff": true, "lineDiff": true,
@@ -613,6 +594,7 @@
"blame": true, "blame": true,
"fileDiff": true, "fileDiff": true,
"history": true, "history": true,
"remote": true,
"status": true "status": true
}, },
"properties": { "properties": {
@@ -628,6 +610,10 @@
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },
"remote": {
"type": "boolean",
"default": true
},
"status": { "status": {
"type": "boolean", "type": "boolean",
"default": true "default": true
@@ -660,6 +646,28 @@
"default": true "default": true
} }
} }
},
"explorerContext": {
"type": "object",
"default": {
"fileDiff": true,
"history": true,
"remote": true
},
"properties": {
"fileDiff": {
"type": "boolean",
"default": true
},
"history": {
"type": "boolean",
"default": true
},
"remote": {
"type": "boolean",
"default": true
}
}
} }
} }
}, },
@@ -977,26 +985,56 @@
"when": "gitlens:enabled" "when": "gitlens:enabled"
} }
], ],
"explorer/context": [ "editor/context": [
{ {
"command": "gitlens.openFileInRemote", "command": "gitlens.openFileInRemote",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote", "when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote",
"group": "navigation@100" "group": "navigation@100"
}, },
{ {
"command": "gitlens.diffWithPrevious", "command": "gitlens.diffLineWithPrevious",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff", "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
"group": "1_gitlens@1" "group": "1_gitlens@1"
}, },
{ {
"command": "gitlens.diffWithWorking", "command": "gitlens.diffLineWithWorking",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff", "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
"group": "1_gitlens@2" "group": "1_gitlens@2"
}, },
{ {
"command": "gitlens.showQuickFileHistory", "command": "gitlens.showQuickCommitFileDetails",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history", "when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details",
"group": "1_gitlens@3"
},
{
"command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@1" "group": "1_gitlens_1@1"
},
{
"command": "gitlens.diffWithWorking",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@2"
},
{
"command": "gitlens.showQuickFileHistory",
"when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history",
"group": "3_gitlens@1"
},
{
"command": "gitlens.toggleFileBlame",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame",
"group": "3_gitlens@2"
},
{
"command": "gitlens.copyShaToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@1"
},
{
"command": "gitlens.copyMessageToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@2"
} }
], ],
"editor/title": [ "editor/title": [
@@ -1068,56 +1106,26 @@
"group": "1_gitlens_2@2" "group": "1_gitlens_2@2"
} }
], ],
"editor/context": [ "explorer/context": [
{ {
"command": "gitlens.openFileInRemote", "command": "gitlens.openFileInRemote",
"when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote", "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote",
"group": "navigation@100" "group": "navigation@100"
}, },
{ {
"command": "gitlens.diffLineWithPrevious", "command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff", "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
"group": "1_gitlens@1" "group": "1_gitlens@1"
}, },
{ {
"command": "gitlens.diffLineWithWorking", "command": "gitlens.diffWithWorking",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff", "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
"group": "1_gitlens@2" "group": "1_gitlens@2"
}, },
{
"command": "gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details",
"group": "1_gitlens@3"
},
{
"command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@1"
},
{
"command": "gitlens.diffWithWorking",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@2"
},
{ {
"command": "gitlens.showQuickFileHistory", "command": "gitlens.showQuickFileHistory",
"when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history", "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history",
"group": "3_gitlens@1" "group": "1_gitlens_1@1"
},
{
"command": "gitlens.toggleFileBlame",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame",
"group": "3_gitlens@2"
},
{
"command": "gitlens.copyShaToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@1"
},
{
"command": "gitlens.copyMessageToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@2"
} }
] ]
}, },
@@ -1234,7 +1242,7 @@
"postinstall": "node ./node_modules/vscode/bin/install", "postinstall": "node ./node_modules/vscode/bin/install",
"pub": "git clean -xdf && vsce publish", "pub": "git clean -xdf && vsce publish",
"reset": "git clean -xdf && npm install", "reset": "git clean -xdf && npm install",
"vscode:prepublish": "npm install && npm run compile" "vscode:prepublish": "npm install --no-save && npm run compile"
}, },
"dependencies": { "dependencies": {
"applicationinsights": "0.20.1", "applicationinsights": "0.20.1",
@@ -1254,10 +1262,10 @@
"@types/copy-paste": "1.1.30", "@types/copy-paste": "1.1.30",
"@types/iconv-lite": "0.0.1", "@types/iconv-lite": "0.0.1",
"@types/mocha": "2.2.41", "@types/mocha": "2.2.41",
"@types/node": "7.0.27", "@types/node": "7.0.28",
"@types/tmp": "0.0.33", "@types/tmp": "0.0.33",
"mocha": "3.4.2", "mocha": "3.4.2",
"tslint": "5.4.2", "tslint": "5.4.3",
"typescript": "2.3.4", "typescript": "2.3.4",
"vscode": "1.1.0" "vscode": "1.1.0"
} }

View File

@@ -12,7 +12,8 @@ import { WhitespaceController } from './whitespaceController';
export const Decorations = { export const Decorations = {
annotation: window.createTextEditorDecorationType({ annotation: window.createTextEditorDecorationType({
isWholeLine: true isWholeLine: true,
textDecoration: 'none'
} as DecorationRenderOptions), } as DecorationRenderOptions),
highlight: undefined as TextEditorDecorationType | undefined highlight: undefined as TextEditorDecorationType | undefined
}; };
@@ -233,6 +234,7 @@ export class AnnotationController extends Disposable {
for (const [key, p] of this._annotationProviders) { for (const [key, p] of this._annotationProviders) {
if (!TextDocumentComparer.equals(p.document, e.document)) continue; if (!TextDocumentComparer.equals(p.document, e.document)) continue;
// TODO: Rework this once https://github.com/Microsoft/vscode/issues/27231 is released in v1.13
// We have to defer because isDirty is not reliable inside this event // We have to defer because isDirty is not reliable inside this event
setTimeout(() => { setTimeout(() => {
// If the document is dirty all is fine, just kick out since the GitContextTracker will handle it // If the document is dirty all is fine, just kick out since the GitContextTracker will handle it

View File

@@ -77,8 +77,7 @@ export class Annotations {
before: { before: {
...renderOptions.before, ...renderOptions.before,
...{ ...{
contentText: content, contentText: content
margin: '0 26px 0 0'
} }
}, },
dark: { dark: {
@@ -113,7 +112,9 @@ export class Annotations {
before: { before: {
borderStyle: borderStyle, borderStyle: borderStyle,
borderWidth: borderWidth, borderWidth: borderWidth,
height: cfgFileTheme.separateLines ? 'calc(100% - 1px)' : '100%' height: cfgFileTheme.separateLines ? 'calc(100% - 1px)' : '100%',
margin: '0 26px 0 0',
textDecoration: 'none'
}, },
dark: { dark: {
backgroundColor: cfgFileTheme.dark.backgroundColor || undefined, backgroundColor: cfgFileTheme.dark.backgroundColor || undefined,
@@ -123,7 +124,7 @@ export class Annotations {
backgroundColor: cfgFileTheme.light.backgroundColor || undefined, backgroundColor: cfgFileTheme.light.backgroundColor || undefined,
color: cfgFileTheme.light.foregroundColor || themeDefaults.annotations.file.gutter.light.foregroundColor color: cfgFileTheme.light.foregroundColor || themeDefaults.annotations.file.gutter.light.foregroundColor
} as DecorationInstanceRenderOptions } as DecorationInstanceRenderOptions
}; } as IRenderOptions;
} }
static hover(commit: GitCommit, renderOptions: IRenderOptions, heatmap: boolean): DecorationOptions { static hover(commit: GitCommit, renderOptions: IRenderOptions, heatmap: boolean): DecorationOptions {
@@ -142,7 +143,8 @@ export class Annotations {
borderWidth: '0 0 0 2px', borderWidth: '0 0 0 2px',
contentText: '\u200B', contentText: '\u200B',
height: cfgTheme.annotations.file.hover.separateLines ? 'calc(100% - 1px)' : '100%', height: cfgTheme.annotations.file.hover.separateLines ? 'calc(100% - 1px)' : '100%',
margin: '0 26px 0 0' margin: '0 26px 0 0',
textDecoration: 'none'
} }
} as IRenderOptions; } as IRenderOptions;
} }

View File

@@ -11,7 +11,8 @@ import { BlameabilityChangeEvent, CommitFormatter, GitCommit, GitContextTracker,
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({ const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({
after: { after: {
margin: '0 0 0 4em' margin: '0 0 0 3em',
textDecoration: 'none'
} }
} as DecorationRenderOptions); } as DecorationRenderOptions);
@@ -23,6 +24,7 @@ export class CurrentLineController extends Disposable {
private _currentLine: number = -1; private _currentLine: number = -1;
private _disposable: Disposable; private _disposable: Disposable;
private _editor: TextEditor | undefined; private _editor: TextEditor | undefined;
private _isAnnotating: boolean = false;
private _statusBarItem: StatusBarItem | undefined; private _statusBarItem: StatusBarItem | undefined;
private _updateBlameDebounced: (line: number, editor: TextEditor) => Promise<void>; private _updateBlameDebounced: (line: number, editor: TextEditor) => Promise<void>;
private _uri: GitUri; private _uri: GitUri;
@@ -44,7 +46,7 @@ export class CurrentLineController extends Disposable {
} }
dispose() { dispose() {
this._editor && this._editor.setDecorations(annotationDecoration, []); this._clearAnnotations(this._editor, true);
this._activeEditorLineDisposable && this._activeEditorLineDisposable.dispose(); this._activeEditorLineDisposable && this._activeEditorLineDisposable.dispose();
this._statusBarItem && this._statusBarItem.dispose(); this._statusBarItem && this._statusBarItem.dispose();
@@ -61,9 +63,7 @@ export class CurrentLineController extends Disposable {
!Objects.areEquivalent(cfg.annotations.line.hover, this._config && this._config.annotations.line.hover) || !Objects.areEquivalent(cfg.annotations.line.hover, this._config && this._config.annotations.line.hover) ||
!Objects.areEquivalent(cfg.theme.annotations.line.trailing, this._config && this._config.theme.annotations.line.trailing)) { !Objects.areEquivalent(cfg.theme.annotations.line.trailing, this._config && this._config.theme.annotations.line.trailing)) {
changed = true; changed = true;
if (this._editor) { this._clearAnnotations(this._editor);
this._editor.setDecorations(annotationDecoration, []);
}
} }
if (!Objects.areEquivalent(cfg.statusBar, this._config && this._config.statusBar)) { if (!Objects.areEquivalent(cfg.statusBar, this._config && this._config.statusBar)) {
@@ -117,13 +117,10 @@ export class CurrentLineController extends Disposable {
private async _onActiveTextEditorChanged(editor: TextEditor | undefined) { private async _onActiveTextEditorChanged(editor: TextEditor | undefined) {
this._currentLine = -1; this._currentLine = -1;
this._clearAnnotations(this._editor);
const previousEditor = this._editor;
previousEditor && previousEditor.setDecorations(annotationDecoration, []);
if (editor === undefined || !this.isEditorBlameable(editor)) { if (editor === undefined || !this.isEditorBlameable(editor)) {
this.clear(editor); this.clear(editor);
this._editor = undefined; this._editor = undefined;
return; return;
@@ -169,12 +166,14 @@ export class CurrentLineController extends Disposable {
const line = e.selections[0].active.line; const line = e.selections[0].active.line;
if (line === this._currentLine) return; if (line === this._currentLine) return;
this._currentLine = line; this._currentLine = line;
if (!this._uri && e.textEditor) { if (!this._uri && e.textEditor !== undefined) {
this._uri = await GitUri.fromUri(e.textEditor.document.uri, this.git); this._uri = await GitUri.fromUri(e.textEditor.document.uri, this.git);
} }
this._clearAnnotations(e.textEditor);
this._updateBlameDebounced(line, e.textEditor); this._updateBlameDebounced(line, e.textEditor);
} }
@@ -198,19 +197,23 @@ export class CurrentLineController extends Disposable {
} }
} }
async clear(editor: TextEditor | undefined, previousEditor?: TextEditor) { async clear(editor: TextEditor | undefined) {
this._clearAnnotations(editor, previousEditor); this._clearAnnotations(editor, true);
this._statusBarItem && this._statusBarItem.hide(); this._statusBarItem && this._statusBarItem.hide();
} }
private async _clearAnnotations(editor: TextEditor | undefined, previousEditor?: TextEditor) { private async _clearAnnotations(editor: TextEditor | undefined, force: boolean = false) {
editor && editor.setDecorations(annotationDecoration, []); if (editor === undefined || (!this._isAnnotating && !force)) return;
editor.setDecorations(annotationDecoration, []);
this._isAnnotating = false;
if (!force) return;
// I have no idea why the decorators sometimes don't get removed, but if they don't try again with a tiny delay // I have no idea why the decorators sometimes don't get removed, but if they don't try again with a tiny delay
if (editor !== undefined) {
await Functions.wait(1); await Functions.wait(1);
editor.setDecorations(annotationDecoration, []); editor.setDecorations(annotationDecoration, []);
} }
}
async show(commit: GitCommit, blameLine: IGitCommitLine, editor: TextEditor) { async show(commit: GitCommit, blameLine: IGitCommitLine, editor: TextEditor) {
// I have no idea why I need this protection -- but it happens // I have no idea why I need this protection -- but it happens
@@ -388,6 +391,7 @@ export class CurrentLineController extends Disposable {
if (decorationOptions.length) { if (decorationOptions.length) {
editor.setDecorations(annotationDecoration, decorationOptions); editor.setDecorations(annotationDecoration, decorationOptions);
this._isAnnotating = true;
} }
} }

View File

@@ -16,7 +16,7 @@ import { ShowQuickRepoStatusCommand, ShowQuickStashListCommand } from './command
import { StashApplyCommand, StashDeleteCommand, StashSaveCommand } from './commands'; import { StashApplyCommand, StashDeleteCommand, StashSaveCommand } from './commands';
import { ToggleCodeLensCommand } from './commands'; import { ToggleCodeLensCommand } from './commands';
import { Keyboard } from './commands'; import { Keyboard } from './commands';
import { IConfig } from './configuration'; import { BlameLineHighlightLocations, CodeLensLocations, IConfig, LineAnnotationType } from './configuration';
import { ApplicationInsightsKey, BuiltInCommands, ExtensionKey, QualifiedExtensionId, WorkspaceState } from './constants'; import { ApplicationInsightsKey, BuiltInCommands, ExtensionKey, QualifiedExtensionId, WorkspaceState } from './constants';
import { CurrentLineController } from './currentLineController'; import { CurrentLineController } from './currentLineController';
import { GitContentProvider } from './gitContentProvider'; import { GitContentProvider } from './gitContentProvider';
@@ -61,9 +61,12 @@ export async function activate(context: ExtensionContext) {
telemetryContext['git.version'] = gitVersion; telemetryContext['git.version'] = gitVersion;
Telemetry.setContext(telemetryContext); Telemetry.setContext(telemetryContext);
await migrateSettings(context);
notifyOnUnsupportedGitVersion(context, gitVersion); notifyOnUnsupportedGitVersion(context, gitVersion);
notifyOnNewGitLensVersion(context, gitlensVersion); notifyOnNewGitLensVersion(context, gitlensVersion);
await context.globalState.update(WorkspaceState.GitLensVersion, gitlensVersion);
const git = new GitService(context, repoPath); const git = new GitService(context, repoPath);
context.subscriptions.push(git); context.subscriptions.push(git);
@@ -124,6 +127,130 @@ export async function activate(context: ExtensionContext) {
// this method is called when your extension is deactivated // this method is called when your extension is deactivated
export function deactivate() { } export function deactivate() { }
async function migrateSettings(context: ExtensionContext) {
const previousVersion = context.globalState.get<string>(WorkspaceState.GitLensVersion);
if (previousVersion === undefined) return;
const [major] = previousVersion.split('.');
if (parseInt(major, 10) >= 4) return;
try {
const cfg = workspace.getConfiguration(ExtensionKey);
const prevCfg = workspace.getConfiguration().get<any>(ExtensionKey)!;
if (prevCfg.blame !== undefined && prevCfg.blame.annotation !== undefined) {
switch (prevCfg.blame.annotation.activeLine) {
case 'off':
await cfg.update('blame.line.enabled', false, true);
break;
case 'hover':
await cfg.update('blame.line.annotationType', LineAnnotationType.Hover, true);
break;
}
if (prevCfg.blame.annotation.activeLineDarkColor != null) {
await cfg.update('theme.annotations.line.trailing.dark.foregroundColor', prevCfg.blame.annotation.activeLineDarkColor, true);
}
if (prevCfg.blame.annotation.activeLineLightColor != null) {
await cfg.update('theme.annotations.line.trailing.light.foregroundColor', prevCfg.blame.annotation.activeLineLightColor, true);
}
switch (prevCfg.blame.annotation.highlight) {
case 'none':
await cfg.update('blame.file.lineHighlight.enabled', false);
break;
case 'gutter':
await cfg.update('blame.file.lineHighlight.locations', [BlameLineHighlightLocations.Gutter, BlameLineHighlightLocations.OverviewRuler], true);
break;
case 'line':
await cfg.update('blame.file.lineHighlight.locations', [BlameLineHighlightLocations.Line, BlameLineHighlightLocations.OverviewRuler], true);
break;
case 'both':
}
if (prevCfg.blame.annotation.dateFormat != null) {
await cfg.update('annotations.file.gutter.dateFormat', prevCfg.blame.annotation.dateFormat, true);
await cfg.update('annotations.line.trailing.dateFormat', prevCfg.blame.annotation.dateFormat, true);
}
}
if (prevCfg.codeLens !== undefined) {
switch (prevCfg.codeLens.visibility) {
case 'ondemand':
case 'off':
await cfg.update('codeLens.enabled', false);
}
switch (prevCfg.codeLens.location) {
case 'all':
await cfg.update('codeLens.locations', [CodeLensLocations.Document, CodeLensLocations.Containers, CodeLensLocations.Blocks], true);
break;
case 'document+containers':
await cfg.update('codeLens.locations', [CodeLensLocations.Document, CodeLensLocations.Containers], true);
break;
case 'document':
await cfg.update('codeLens.locations', [CodeLensLocations.Document], true);
break;
case 'custom':
await cfg.update('codeLens.locations', [CodeLensLocations.Custom], true);
break;
}
if (prevCfg.codeLens.locationCustomSymbols != null) {
await cfg.update('codeLens.customLocationSymbols', prevCfg.codeLens.locationCustomSymbols, true);
}
}
if ((prevCfg.menus && prevCfg.menus.diff && prevCfg.menus.diff.enabled) === false) {
await cfg.update('advanced.menus', {
editorContext: {
blame: true,
copy: true,
details: true,
fileDiff: false,
history: true,
lineDiff: false,
remote: true
},
editorTitle: {
blame: true,
fileDiff: false,
history: true,
remote: true,
status: true
},
editorTitleContext: {
blame: true,
fileDiff: false,
history: true,
remote: true
},
explorerContext: {
fileDiff: false,
history: true,
remote: true
}
}, true);
}
switch (prevCfg.statusBar && prevCfg.statusBar.date) {
case 'off':
await cfg.update('statusBar.format', '${author}', true);
break;
case 'absolute':
await cfg.update('statusBar.format', '${author}, ${date}', true);
break;
}
}
catch (ex) {
Logger.error(ex, 'migrateSettings');
}
finally {
await window.showInformationMessage(`GitLens v4 adds many new settings and removes a few old ones, so please review your settings to ensure they are configured properly.`);
}
}
async function notifyOnNewGitLensVersion(context: ExtensionContext, version: string) { async function notifyOnNewGitLensVersion(context: ExtensionContext, version: string) {
if (context.globalState.get(WorkspaceState.SuppressUpdateNotice, false)) return; if (context.globalState.get(WorkspaceState.SuppressUpdateNotice, false)) return;
@@ -143,8 +270,6 @@ async function notifyOnNewGitLensVersion(context: ExtensionContext, version: str
} }
} }
await context.globalState.update(WorkspaceState.GitLensVersion, version);
if (previousVersion) { if (previousVersion) {
const [major, minor] = version.split('.'); const [major, minor] = version.split('.');
const [prevMajor, prevMinor] = previousVersion.split('.'); const [prevMajor, prevMinor] = previousVersion.split('.');

View File

@@ -75,6 +75,7 @@ export class GitContextTracker extends Disposable {
// this._unsubscribeToDocumentChanges(); // this._unsubscribeToDocumentChanges();
// this.updateBlameability(false); // this.updateBlameability(false);
// TODO: Rework this once https://github.com/Microsoft/vscode/issues/27231 is released in v1.13
// We have to defer because isDirty is not reliable inside this event // We have to defer because isDirty is not reliable inside this event
setTimeout(() => this._updateBlameability(!e.document.isDirty), 1); setTimeout(() => this._updateBlameability(!e.document.isDirty), 1);
} }

View File

@@ -1,5 +1,5 @@
'use strict'; 'use strict';
import { Functions, Iterables, Strings } from './system'; import { Functions, Iterables } from './system';
import { CancellationToken, CodeLens, CodeLensProvider, Command, commands, DocumentSelector, Event, EventEmitter, ExtensionContext, Position, Range, SymbolInformation, SymbolKind, TextDocument, Uri, workspace } from 'vscode'; import { CancellationToken, CodeLens, CodeLensProvider, Command, commands, DocumentSelector, Event, EventEmitter, ExtensionContext, Position, Range, SymbolInformation, SymbolKind, TextDocument, Uri, workspace } from 'vscode';
import { Commands, DiffWithPreviousCommandArgs, ShowBlameHistoryCommandArgs, ShowFileHistoryCommandArgs, ShowQuickCommitDetailsCommandArgs, ShowQuickCommitFileDetailsCommandArgs, ShowQuickFileHistoryCommandArgs } from './commands'; import { Commands, DiffWithPreviousCommandArgs, ShowBlameHistoryCommandArgs, ShowFileHistoryCommandArgs, ShowQuickCommitDetailsCommandArgs, ShowQuickCommitFileDetailsCommandArgs, ShowQuickFileHistoryCommandArgs } from './commands';
import { BuiltInCommands, DocumentSchemes, ExtensionKey } from './constants'; import { BuiltInCommands, DocumentSchemes, ExtensionKey } from './constants';
@@ -184,17 +184,8 @@ export class GitCodeLensProvider implements CodeLensProvider {
// Make sure there is only 1 lens per line // Make sure there is only 1 lens per line
if (lenses.length && lenses[lenses.length - 1].range.start.line === line.lineNumber) return; if (lenses.length && lenses[lenses.length - 1].range.start.line === line.lineNumber) return;
let startChar = -1; // Anchor the code lens to the end of the line -- so they are somewhat consistenly placed
try { let startChar = line.range.end.character - 1;
startChar = line.text.search(`\\b${Strings.escapeRegExp(symbol.name)}\\b`);
}
catch (ex) { }
if (startChar === -1) {
startChar = line.firstNonWhitespaceCharacterIndex;
}
else {
startChar += Math.floor(symbol.name.length / 2);
}
let blameForRangeFn: (() => IGitBlameLines | undefined) | undefined = undefined; let blameForRangeFn: (() => IGitBlameLines | undefined) | undefined = undefined;
if (this._documentIsDirty || this._config.codeLens.recentChange.enabled) { if (this._documentIsDirty || this._config.codeLens.recentChange.enabled) {

View File

@@ -214,6 +214,7 @@ export class GitService extends Disposable {
if (!this.UseCaching) return; if (!this.UseCaching) return;
if (e.document.uri.scheme !== DocumentSchemes.File) return; if (e.document.uri.scheme !== DocumentSchemes.File) return;
// TODO: Rework this once https://github.com/Microsoft/vscode/issues/27231 is released in v1.13
// We have to defer because isDirty is not reliable inside this event // We have to defer because isDirty is not reliable inside this event
setTimeout(() => { setTimeout(() => {
// If the document is dirty all is fine, we'll just wait for the save before clearing our cache // If the document is dirty all is fine, we'll just wait for the save before clearing our cache