Skip to content

Commit a24960a

Browse files
committed
docs: fix broken/outdated overrides example
Fixes: #340, #341
1 parent 52a9d4c commit a24960a

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828
- fix(config): `options.darken.floats` is not used (#345)
2929
- fix(compiler): consider entire config when hashing (#350) (related-to #262, #340, #341)
3030
- fix(compiler): always write hash to filesystem when compilation occurs incl. when `require('github-theme').compile()` is called directly (#350)
31+
- Fixed #340 and #341 (broken/outdated `overrides` example in docs)
3132

3233
## [v1.0.2] - 03 May 2023
3334

Usage.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,27 @@ The individual components, such as [palettes][palette], [specs][spec], and [grou
5757
according to your preferences.
5858

5959
```lua
60-
local override = require('github-theme').override
61-
override.palettes({
60+
local override = require('github-theme.override')
61+
override.palettes = {
6262
github_dark = {
6363
red = '#ff0000',
6464
},
6565
github_light = {
6666
comment = '#636e7b',
6767
},
68-
})
69-
override.specs({
68+
}
69+
override.specs = {
7070
github_dark = {
7171
syntax = {
7272
keyword = 'magenta'
7373
}
7474
}
75-
})
76-
override.groups({
75+
}
76+
override.groups = {
7777
all = {
7878
IncSearch = { bg = 'palette.cyan' },
7979
},
80-
})
80+
}
8181
```
8282

8383
Overrides for [palettes][palette] and [specs][spec] are defined per style. The purpose of overriding these components is to change the colors used in

doc/github-nvim-theme.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,27 @@ The individual components, such as |github-nvim-theme-palettes|,
9797
separately to customize the theme according to your preferences.
9898

9999
>lua
100-
local override = require('github-theme').override
101-
override.palettes({
100+
local override = require('github-theme.override')
101+
override.palettes = {
102102
github_dark = {
103103
red = '#ff0000',
104104
},
105105
github_light = {
106106
comment = '#636e7b',
107107
},
108-
})
109-
override.specs({
108+
}
109+
override.specs = {
110110
github_dark = {
111111
syntax = {
112112
keyword = 'magenta'
113113
}
114114
}
115-
})
116-
override.groups({
115+
}
116+
override.groups = {
117117
all = {
118118
IncSearch = { bg = 'palette.cyan' },
119119
},
120-
})
120+
}
121121
<
122122

123123
Overrides for |github-nvim-theme-palettes| and |github-nvim-theme-specs| are

0 commit comments

Comments
 (0)