Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): recipe to modify a style #601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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