Skip to content

Commit

Permalink
docs: recipe to modify a style
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Dujava <[email protected]>
  • Loading branch information
jdujava committed Jul 15, 2024
1 parent 6adfcde commit d3d5a35
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,30 @@ require("tokyonight").setup({

</details>

<details>
<summary>Create a Modified Style</summary>

To modify a style before all of the `colors` and `highlights` are generated
from the corresponding color palette, you can use the following:

```lua
local styles = require('tokyonight.colors').styles

-- change the colors for your new palette here
---@type Palette
local modified_colors = {
bg = '#1e1e1e',
fg = '...',
...,
}
-- save as `custom` style (by extending the `storm` style)
styles.custom = vim.tbl_extend('force', styles.storm --[[@as Palette]], modified_colors)

require('tokyonight').load(opts) -- load custom style (be sure to have opts.style = 'custom')
```

</details>

<details>
<summary>Fix <code>undercurls</code> in Tmux</summary>

Expand Down

0 comments on commit d3d5a35

Please sign in to comment.