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

Conversation

jdujava
Copy link

@jdujava jdujava commented Jul 14, 2024

Description

Document the ability to modify the color palette of a style.

Related Issue(s)

See #595.

@jdujava jdujava changed the title docs: recipe to modify a style docs(readme): recipe to modify a style Jul 15, 2024
Copy link
Contributor

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 15, 2024
@jdujava
Copy link
Author

jdujava commented Aug 15, 2024

I think this is still relevant :).

@github-actions github-actions bot removed the stale label Aug 16, 2024
@MayRedwood
Copy link

This is not very clear - where, exactly, are we supposed to put that code?

@jdujava
Copy link
Author

jdujava commented Sep 1, 2024

Neighboring examples also don't provide exact instructions on where to put the code. I personally put it in the config function in lazy spec for tokyonight like

config = function(_, opts)                                                       
    local styles = require('tokyonight.colors').styles                           
                                                                                 
    -- change the colors for your new palette here                                          
    ---@type Palette                                                             
    local modified_colors = {                                                    
        bg_darker    = '#1a1a1a',                                                
        ...
    }                                                                            
    -- 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')
                                              
end,                                                                             

If it would be desirable, I have no problem including it in the recipe.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 2, 2024
@jdujava
Copy link
Author

jdujava commented Oct 2, 2024

Is there a reason for not merging this yet?

@github-actions github-actions bot removed the stale label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Nov 3, 2024

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants