From a24960a6ee4a972c18dddaf2442bdadfe6aa4dee Mon Sep 17 00:00:00 2001 From: Tyler Miller Date: Mon, 15 Jul 2024 23:06:20 -0700 Subject: [PATCH] docs: fix broken/outdated `overrides` example Fixes: #340, #341 --- CHANGELOG.md | 1 + Usage.md | 14 +++++++------- doc/github-nvim-theme.txt | 14 +++++++------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f58f79..27a838dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix(config): `options.darken.floats` is not used (#345) - fix(compiler): consider entire config when hashing (#350) (related-to #262, #340, #341) - fix(compiler): always write hash to filesystem when compilation occurs incl. when `require('github-theme').compile()` is called directly (#350) +- Fixed #340 and #341 (broken/outdated `overrides` example in docs) ## [v1.0.2] - 03 May 2023 diff --git a/Usage.md b/Usage.md index 62092fab..b7c7437b 100644 --- a/Usage.md +++ b/Usage.md @@ -57,27 +57,27 @@ The individual components, such as [palettes][palette], [specs][spec], and [grou according to your preferences. ```lua -local override = require('github-theme').override -override.palettes({ +local override = require('github-theme.override') +override.palettes = { github_dark = { red = '#ff0000', }, github_light = { comment = '#636e7b', }, -}) -override.specs({ +} +override.specs = { github_dark = { syntax = { keyword = 'magenta' } } -}) -override.groups({ +} +override.groups = { all = { IncSearch = { bg = 'palette.cyan' }, }, -}) +} ``` Overrides for [palettes][palette] and [specs][spec] are defined per style. The purpose of overriding these components is to change the colors used in diff --git a/doc/github-nvim-theme.txt b/doc/github-nvim-theme.txt index ee71ea4a..38a3ca68 100644 --- a/doc/github-nvim-theme.txt +++ b/doc/github-nvim-theme.txt @@ -97,27 +97,27 @@ The individual components, such as |github-nvim-theme-palettes|, separately to customize the theme according to your preferences. >lua - local override = require('github-theme').override - override.palettes({ + local override = require('github-theme.override') + override.palettes = { github_dark = { red = '#ff0000', }, github_light = { comment = '#636e7b', }, - }) - override.specs({ + } + override.specs = { github_dark = { syntax = { keyword = 'magenta' } } - }) - override.groups({ + } + override.groups = { all = { IncSearch = { bg = 'palette.cyan' }, }, - }) + } < Overrides for |github-nvim-theme-palettes| and |github-nvim-theme-specs| are