diff --git a/CHANGELOG.md b/CHANGELOG.md index 045780e..c065bcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Adds a `gitlens.views.stashFileDescriptionFormat` setting to specify the description format of a stashed file in the views - Adds a `gitlens.views.stashDescriptionFormat` setting to specify the description format of stashed changes in the views - Adds a `gitlens.views.statusFileDescriptionFormat` setting to specify the description format of the status of a working or committed file in the views +- Adds a `gitlens.views.repositories.compact` setting to specify whether to show the _Repositories_ view in a compact display density — closes [#571](https://github.com/eamodio/vscode-gitlens/issues/571) ### Fixed diff --git a/README.md b/README.md index 9959864..861d822 100644 --- a/README.md +++ b/README.md @@ -751,6 +751,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings') | `gitlens.views.repositories.autoRefresh` | Specifies whether to automatically refresh the _Repositories_ view when the repository or the file system changes | | `gitlens.views.repositories.autoReveal` | Specifies whether to automatically reveal repositories in the _Repositories_ view when opening files | | `gitlens.views.repositories.branches.layout` | Specifies how the _Repositories_ view will display branches

`list` - displays branches as a list
`tree` - displays branches as a tree when branch names contain slashes `/` | +| `gitlens.views.repositories.compact` | Specifies whether to show the _Repositories_ view in a compact display density | | `gitlens.views.repositories.enabled` | Specifies whether to show the _Repositories_ view | | `gitlens.views.repositories.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Repositories_ view. Only applies when `gitlens.views.repositories.files.layout` is set to `tree` or `auto` | | `gitlens.views.repositories.files.layout` | Specifies how the _Repositories_ view will display files

`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.repositories.files.threshold` value and the number of files at each nesting level
`list` - displays files as a list
`tree` - displays files as a tree | diff --git a/package.json b/package.json index d7ac6c0..d8f6660 100644 --- a/package.json +++ b/package.json @@ -1367,6 +1367,12 @@ "markdownDescription": "Specifies how the _Repositories_ view will display branches", "scope": "window" }, + "gitlens.views.repositories.compact": { + "type": "boolean", + "default": false, + "markdownDescription": "Specifies whether to show the _Repositories_ view in a compact display density", + "scope": "window" + }, "gitlens.views.repositories.enabled": { "type": "boolean", "default": true, diff --git a/src/views/nodes/repositoryNode.ts b/src/views/nodes/repositoryNode.ts index a44a992..cfe4bda 100644 --- a/src/views/nodes/repositoryNode.ts +++ b/src/views/nodes/repositoryNode.ts @@ -74,7 +74,9 @@ export class RepositoryNode extends SubscribeableViewNode { children.push(new StatusFilesNode(this.view, this, status, range)); } - children.push(new MessageNode(this.view, this, '', GlyphChars.Dash.repeat(2), '')); + if (!this.view.config.repositories.compact) { + children.push(new MessageNode(this.view, this, '', GlyphChars.Dash.repeat(2), '')); + } } children.push(