Skip to content

jdtron/randomcs.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

randomcs.nvim

Random color schemes in NeoVim ✨

Installation

Using Lazy.nvim

{
    'jdtron/randomcs',
    lazy = false,
    init = function ()
        require('randomcs').setup({
            enabled = true,
            mode = 'weekly',
            default = 'tokyonight-moon',
        })
    end,
}

Configuration

Configuration overview

{
    -- Disable random scheme selection. Use with `default` to set a fixed color scheme
    -- Default: true
    enabled = true,                
                                    
    -- Mode to use. Select from: daily, weekly, monthly
    -- Default: 'daily'
    mode = 'weekly',                
                                    
    -- Default color scheme to use, when random selection is disabled
    -- Default: nil
    default = 'tokyonight-moon',    
                                    
    -- Send notification when random scheme is applied
    -- Default: true
    notify = true,                  
},

Register Color Schemes

Set a list of themes on setup:

require('randomcs').setup({
    enabled = true,
    mode = 'weekly',
    default = 'tokyonight-moon',
}, {
    'tokyonight-moon',
    'onedark',
    'kanagawa',
})

Or make the color scheme plugins register themself on init. Example with Lazy.nvim:

{
    'folke/tokyonight.nvim',
    init = function ()
        require('randomcs').register('tokyonight-moon')
    end
},

Apply Color Scheme

Call require('randomcs').apply() to apply a color scheme.
This can be done either chained with setup or with your own hooks.

require('randomcs').setup({ ... }).apply()

There are also user commands available:

  • Randomcs Apply a random color scheme (same as .apply())
  • RandomcsDefault Apply the default color scheme

About

Random color schemes in NeoVim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages