Skip to content

Commit fdc2e89

Browse files
committed
Adds real theming support
1 parent 7862c7c commit fdc2e89

File tree

9 files changed

+165
-330
lines changed

9 files changed

+165
-330
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88
### Added
9+
- Adds theming support - vscode themes can now specify GitLens colors as well as directly by using [`workbench.colorCustomization`](https://code.visualstudio.com/docs/getstarted/themes#_customize-a-color-theme))
10+
- Adds `gitlens.gutterBackgroundColor` themable color
11+
- Adds `gitlens.gutterForegroundColor` themable color
12+
- Adds `gitlens.gutterUncommittedForegroundColor` themable color
13+
- Adds `gitlens.trailingLineBackgroundColor` themable color
14+
- Adds `gitlens.trailingLineForegroundColor` themable color
15+
- Adds `gitlens.lineHighlightBackgroundColor` themable color
16+
- Adds `gitlens.lineHighlightOverviewRulerColor` themable color
917
- Adds `gitlens.advanced.messages` setting to specify which messages should be suppressed
1018

1119
### Changed
20+
- Renames `gitlens.theme.annotations.file.gutter.separateLines` setting to `gitlens.annotations.file.gutter.separateLines`
1221
- Changes from using `globalState` to use `gitlens.advanced.messages` setting for message suppression - provides more control and avoids strange intermittent with `globalState`
1322

23+
### Removed
24+
- Removes `gitlens.theme.*` settings - now using built-in theme support
25+
1426
## [6.1.2] - 2017-11-21
1527
### Fixed
1628
- Fixes [#207](https://github.com/eamodio/vscode-gitlens/issues/207) - Applying and deleting stashes suddenly stopped working
@@ -478,7 +490,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
478490

479491
## [4.0.0] - 2017-06-09
480492
### Added
481-
- Adds all-new, beautiful, highly customizable and themeable, file blame annotations
493+
- Adds all-new, beautiful, highly customizable and themable, file blame annotations
482494
- Can now fully customize the [layout and content](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens#file-blame-annotation-settings), as well as the [theme](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens#theme-settings)
483495
- Adds all-new configurability and themeability to the current line blame annotations
484496
- Can now fully customize the [layout and content](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens#line-blame-annotation-settings), as well as the [theme](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens#theme-settings)

README.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ While GitLens is highly customizable and provides many [configuration settings](
3333

3434
### Git Blame Annotations
3535

36-
- 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)
36+
- Adds an unobtrusive, highly [customizable](#line-blame-annotation-settings) and [themable](#themable-colors), **Git blame annotation** to the end of the current line ([optional](#line-blame-annotation-settings), on by default)
3737

3838
![Line Blame Annotation](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/screenshot-line-blame-annotation.png)
3939
![Line Blame Annotations (hover)](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/screenshot-line-blame-annotations.png)
@@ -52,7 +52,7 @@ While GitLens is highly customizable and provides many [configuration settings](
5252
- Clicking on `Changes` will run the `Compare File Revisions` command (`gitlens.diffWith`)
5353
- Clicking the current and previous commit ids will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
5454

55-
- Adds on-demand, beautiful, highly [customizable](#file-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotations** of the whole file
55+
- Adds on-demand, beautiful, highly [customizable](#file-blame-annotation-settings) and [themable](#themable-colors), **Git blame annotations** of the whole file
5656

5757
![File Blame Annotation](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/screenshot-file-blame-annotation.png)
5858

@@ -94,7 +94,7 @@ While GitLens is highly customizable and provides many [configuration settings](
9494

9595
### Git Recent Changes Annotations
9696

97-
- Adds on-demand, [customizable](#file-recent-changes-annotation-settings) and [themeable](#theme-settings), **recent changes annotations** of the whole file
97+
- Adds on-demand, [customizable](#file-recent-changes-annotation-settings) and [themable](#themable-colors), **recent changes annotations** of the whole file
9898
- Highlights all of lines changed in the most recent commit
9999
- Adds a `details` hover annotation to each line, which provides more commit details ([optional](#file-recent-changes-annotation-settings), on by default)
100100
- Clicking the commit id will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
@@ -321,6 +321,20 @@ While GitLens is highly customizable and provides many [configuration settings](
321321

322322
Add [`"gitlens.insiders": true`](#general-extension-settings) to your settings to join the insiders channel and get early access to upcoming features. Be aware that because this provides early access expect there to be issues.
323323

324+
## Themable Colors
325+
326+
GitLens defines a set of themable colors which can be provided by vscode themes or directly by the user using [`workbench.colorCustomization`](https://code.visualstudio.com/docs/getstarted/themes#_customize-a-color-theme).
327+
328+
|Name | Description
329+
|-----|------------
330+
|`gitlens.gutterBackgroundColor`|Specifies the background color of the gutter blame annotations
331+
|`gitlens.gutterForegroundColor`|Specifies the foreground color of the gutter blame annotations
332+
|`gitlens.gutterUncommittedForegroundColor`|Specifies the foreground color of an uncommitted line in the gutter blame annotations
333+
|`gitlens.trailingLineBackgroundColor`|Specifies the background color of the trailing blame annotation
334+
|`gitlens.trailingLineForegroundColor`|Specifies the foreground color of the trailing blame annotation
335+
|`gitlens.lineHighlightBackgroundColor`|Specifies the background color of the associated line highlights in blame annotations
336+
|`gitlens.lineHighlightOverviewRulerColor`|Specifies the overview ruler color of the associated line highlights in blame annotations
337+
324338
## Extension Settings
325339

326340
GitLens is highly customizable and provides many configuration settings to allow the personalization of almost all features
@@ -354,6 +368,7 @@ GitLens is highly customizable and provides many configuration settings to allow
354368
|`gitlens.annotations.file.gutter.hover.details`|Specifies whether or not to provide a commit details hover annotation over the gutter blame annotations
355369
|`gitlens.annotations.file.gutter.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation over the gutter blame annotations
356370
|`gitlens.annotations.file.gutter.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
371+
|`gitlens.annotations.file.gutter.separateLines`|Specifies whether or not gutter blame annotations will have line separators
357372
|`gitlens.annotations.file.hover.details`|Specifies whether or not to provide a commit details hover annotation over each line
358373
|`gitlens.annotations.file.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation over each line
359374
|`gitlens.annotations.file.hover.heatmap.enabled`|Specifies whether or not to provide heatmap indicators on the left edge of each line
@@ -435,26 +450,6 @@ GitLens is highly customizable and provides many configuration settings to allow
435450
|`gitlens.strings.codeLens.unsavedChanges.recentChangeOnly`|Specifies the string to be shown in place of the `recent change` code lens when there are unsaved changes
436451
|`gitlens.strings.codeLens.unsavedChanges.authorsOnly`|Specifies the string to be shown in place of the `authors` code lens when there are unsaved changes
437452

438-
### Theme Settings
439-
440-
|Name | Description
441-
|-----|------------
442-
|`gitlens.theme.annotations.file.gutter.separateLines`|Specifies whether or not gutter blame annotations will have line separators
443-
|`gitlens.theme.annotations.file.gutter.dark.backgroundColor`|Specifies the dark theme background color of the gutter blame annotations
444-
|`gitlens.theme.annotations.file.gutter.light.backgroundColor`|Specifies the light theme background color of the gutter blame annotations
445-
|`gitlens.theme.annotations.file.gutter.dark.foregroundColor`|Specifies the dark theme foreground color of the gutter blame annotations
446-
|`gitlens.theme.annotations.file.gutter.light.foregroundColor`|Specifies the light theme foreground color of the gutter blame annotations
447-
|`gitlens.theme.annotations.file.gutter.dark.uncommittedForegroundColor`|Specifies the dark theme foreground color of an uncommitted line in the gutter blame annotations
448-
|`gitlens.theme.annotations.file.gutter.light.uncommittedForegroundColor`|Specifies the light theme foreground color of an uncommitted line in the gutter blame annotations
449-
|`gitlens.theme.annotations.line.trailing.dark.backgroundColor`|Specifies the dark theme background color of the trailing blame annotation
450-
|`gitlens.theme.annotations.line.trailing.light.backgroundColor`|Specifies the light theme background color of the trailing blame annotation
451-
|`gitlens.theme.annotations.line.trailing.dark.foregroundColor`|Specifies the dark theme foreground color of the trailing blame annotation
452-
|`gitlens.theme.annotations.line.trailing.light.foregroundColor`|Specifies the light theme foreground color of the trailing blame annotation
453-
|`gitlens.theme.lineHighlight.dark.backgroundColor`|Specifies the dark theme background color of the associated line highlights in blame annotations. Must be a valid css color
454-
|`gitlens.theme.lineHighlight.light.backgroundColor`|Specifies the light theme background color of the associated line highlights in blame annotations. Must be a valid css color
455-
|`gitlens.theme.lineHighlight.dark.overviewRulerColor`|Specifies the dark theme overview ruler color of the associated line highlights in blame annotations
456-
|`gitlens.theme.lineHighlight.light.overviewRulerColor`|Specifies the light theme overview ruler color of the associated line highlights in blame annotations
457-
458453
### Advanced Settings
459454

460455
|Name | Description

package.json

Lines changed: 71 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@
128128
"description": "Specifies whether or not to trigger hover annotations over the whole line",
129129
"scope": "window"
130130
},
131+
"gitlens.annotations.file.gutter.separateLines": {
132+
"type": "boolean",
133+
"default": true,
134+
"description": "Specifies whether or not gutter blame annotations will be separated by a small gap",
135+
"scope": "window"
136+
},
131137
"gitlens.annotations.file.hover.details": {
132138
"type": "boolean",
133139
"default": true,
@@ -701,96 +707,6 @@
701707
"description": "Specifies the string to be shown in place of the `authors` code lens when there are unsaved changes",
702708
"scope": "window"
703709
},
704-
"gitlens.theme.annotations.file.gutter.separateLines": {
705-
"type": "boolean",
706-
"default": true,
707-
"description": "Specifies whether or not gutter blame annotations will be separated by a small gap",
708-
"scope": "window"
709-
},
710-
"gitlens.theme.annotations.file.gutter.dark.backgroundColor": {
711-
"type": "string",
712-
"default": "rgba(255, 255, 255, 0.075)",
713-
"description": "Specifies the dark theme background color of the gutter blame annotations. Must be a valid css color",
714-
"scope": "window"
715-
},
716-
"gitlens.theme.annotations.file.gutter.light.backgroundColor": {
717-
"type": "string",
718-
"default": "rgba(0, 0, 0, 0.05)",
719-
"description": "Specifies the light theme background color of the gutter blame annotations. Must be a valid css color",
720-
"scope": "window"
721-
},
722-
"gitlens.theme.annotations.file.gutter.dark.foregroundColor": {
723-
"type": "string",
724-
"default": "rgb(190, 190, 190)",
725-
"description": "Specifies the dark theme foreground color of the gutter blame annotations. Must be a valid css color",
726-
"scope": "window"
727-
},
728-
"gitlens.theme.annotations.file.gutter.light.foregroundColor": {
729-
"type": "string",
730-
"default": "rgb(116, 116, 116)",
731-
"description": "Specifies the light theme foreground color of the gutter blame annotations. Must be a valid css color",
732-
"scope": "window"
733-
},
734-
"gitlens.theme.annotations.file.gutter.dark.uncommittedForegroundColor": {
735-
"type": "string",
736-
"default": "rgba(0, 188, 242, 0.6)",
737-
"description": "Specifies the dark theme foreground color of an uncommitted line in the gutter blame annotations. Must be a valid css color",
738-
"scope": "window"
739-
},
740-
"gitlens.theme.annotations.file.gutter.light.uncommittedForegroundColor": {
741-
"type": "string",
742-
"default": "rgba(0, 188, 242, 0.6)",
743-
"description": "Specifies the light theme foreground color of an uncommitted line in the gutter blame annotations. Must be a valid css color",
744-
"scope": "window"
745-
},
746-
"gitlens.theme.annotations.line.trailing.dark.backgroundColor": {
747-
"type": "string",
748-
"default": null,
749-
"description": "Specifies the dark theme background color of the trailing blame annotation. Must be a valid css color",
750-
"scope": "window"
751-
},
752-
"gitlens.theme.annotations.line.trailing.light.backgroundColor": {
753-
"type": "string",
754-
"default": null,
755-
"description": "Specifies the light theme background color of the trailing blame annotation. Must be a valid css color",
756-
"scope": "window"
757-
},
758-
"gitlens.theme.annotations.line.trailing.dark.foregroundColor": {
759-
"type": "string",
760-
"default": "rgba(153, 153, 153, 0.35)",
761-
"description": "Specifies the dark theme foreground color of the trailing blame annotation. Must be a valid css color",
762-
"scope": "window"
763-
},
764-
"gitlens.theme.annotations.line.trailing.light.foregroundColor": {
765-
"type": "string",
766-
"default": "rgba(153, 153, 153, 0.35)",
767-
"description": "Specifies the light theme foreground color of the trailing blame annotation. Must be a valid css color",
768-
"scope": "window"
769-
},
770-
"gitlens.theme.lineHighlight.dark.backgroundColor": {
771-
"type": "string",
772-
"default": "rgba(0, 188, 242, 0.2)",
773-
"description": "Specifies the dark theme background color of the associated line highlights in blame annotations. Must be a valid css color",
774-
"scope": "window"
775-
},
776-
"gitlens.theme.lineHighlight.light.backgroundColor": {
777-
"type": "string",
778-
"default": "rgba(0, 188, 242, 0.2)",
779-
"description": "Specifies the light theme background color of the associated line highlights in blame annotations. Must be a valid css color",
780-
"scope": "window"
781-
},
782-
"gitlens.theme.lineHighlight.dark.overviewRulerColor": {
783-
"type": "string",
784-
"default": "rgba(0, 188, 242, 0.6)",
785-
"description": "Specifies the dark theme overview ruler color of the associated line highlights in blame annotations. Must be a valid css color",
786-
"scope": "window"
787-
},
788-
"gitlens.theme.lineHighlight.light.overviewRulerColor": {
789-
"type": "string",
790-
"default": "rgba(0, 188, 242, 0.6)",
791-
"description": "Specifies the light theme overview ruler color of the associated line highlights in blame annotations. Must be a valid css color",
792-
"scope": "window"
793-
},
794710
"gitlens.advanced.caching.enabled": {
795711
"type": "boolean",
796712
"default": true,
@@ -1043,6 +959,71 @@
1043959
}
1044960
}
1045961
},
962+
"colors": [
963+
{
964+
"id": "gitlens.gutterBackgroundColor",
965+
"description": "Specifies the background color of the gutter blame annotations",
966+
"defaults": {
967+
"dark": "#FFFFFF13",
968+
"light": "#0000000C",
969+
"highContrast": "#FFFFFF13"
970+
}
971+
},
972+
{
973+
"id": "gitlens.gutterForegroundColor",
974+
"description": "Specifies the foreground color of the gutter blame annotations",
975+
"defaults": {
976+
"dark": "#BEBEBE",
977+
"light": "#747474",
978+
"highContrast": "#BEBEBE"
979+
}
980+
},
981+
{
982+
"id": "gitlens.gutterUncommittedForegroundColor",
983+
"description": "Specifies the foreground color of an uncommitted line in the gutter blame annotations",
984+
"defaults": {
985+
"dark": "#00BCF299",
986+
"light": "#00BCF299",
987+
"highContrast": "#00BCF2FF"
988+
}
989+
},
990+
{
991+
"id": "gitlens.trailingLineBackgroundColor",
992+
"description": "Specifies the background color of the trailing blame annotation",
993+
"defaults": {
994+
"dark": "#00000000",
995+
"light": "#00000000",
996+
"highContrast": "#00000000"
997+
}
998+
},
999+
{
1000+
"id": "gitlens.trailingLineForegroundColor",
1001+
"description": "Specifies the foreground color of the trailing blame annotation",
1002+
"defaults": {
1003+
"dark": "#99999959",
1004+
"light": "#99999959",
1005+
"highContrast": "#99999999"
1006+
}
1007+
},
1008+
{
1009+
"id": "gitlens.lineHighlightBackgroundColor",
1010+
"description": "Specifies the background color of the associated line highlights in blame annotations",
1011+
"defaults": {
1012+
"dark": "#00BCF233",
1013+
"light": "#00BCF233",
1014+
"highContrast": "#00BCF233"
1015+
}
1016+
},
1017+
{
1018+
"id": "gitlens.lineHighlightOverviewRulerColor",
1019+
"description": "Specifies the overview ruler color of the associated line highlights in blame annotations",
1020+
"defaults": {
1021+
"dark": "#00BCF299",
1022+
"light": "#00BCF299",
1023+
"highContrast": "#00BCF299"
1024+
}
1025+
}
1026+
],
10461027
"commands": [
10471028
{
10481029
"command": "gitlens.diffDirectory",

0 commit comments

Comments
 (0)