scottmckendry/cyberdream.nvim

github github
colorschemetreesitter-colorschemes
stars 392
issues 5
subscribers 3
forks 16
CREATED

2023-12-21

UPDATED

16 hours ago


🚀 Features

  • Transparency-first design - all design decisions are made with transparency in mind
  • High contrast - Colours have been carefully chosen to be cohesive and easy on the eyes while still being easy to distinguish

image image

📦 Installation

Lazy:

{
    "scottmckendry/cyberdream.nvim",
    lazy = false,
    priority = 1000,
}

Packer:

use { "scottmckendry/cyberdream.nvim" }

Lualine (optional):

{
    local cyberdream = require("lualine.themes.cyberdream") -- or require("lualine.themes.cyberdream-light") for the light variant
    require("lualine").setup({
        -- ... other config
        options = {
            theme = "cyberdream",
        },
        -- ... other config
    })
}

See my personal lualine config here for an example.

🎨 Usage

vim.cmd("colorscheme cyberdream")

⚙️ Configuring

Calling setup is optional, but allows you to configure the theme to your liking. Below is an example of all the available configuration options with their default values:

require("cyberdream").setup({
    -- Enable transparent background
    transparent = false,

    -- Enable italics comments
    italic_comments = false,

    -- Replace all fillchars with ' ' for the ultimate clean look
    hide_fillchars = false,

    -- Modern borderless telescope theme
    borderless_telescope = true

    -- Set terminal colors used in `:terminal`
    terminal_colors = true

    theme = {
        variant = "default", -- use "light" for the light variant
        highlights = {
            -- Highlight groups to override, adding new groups is also possible
            -- See `:h highlight-groups` for a list of highlight groups or run `:hi` to see all groups and their current values

            -- Example:
            Comment = { fg = "#696969", bg = "NONE", italic = true },

            -- Complete list can be found in `lua/cyberdream/theme.lua`
        },

        -- Override a color entirely
        colors = {
            -- For a list of colors see `lua/cyberdream/colours.lua`
            -- Example:
            bg = "#000000",
            green = "#00ff00",
            magenta = "#ff00ff",
        },
    },
})

🧑‍🍳 Recipes

Include these alongside the setup function to add additional functionality to the theme.

Map a key to toggle between light and dark mode

-- Add a custom keybinding to toggle the colorscheme
vim.api.nvim_set_keymap("n", "<leader>tt", ":CyberdreamToggleMode<CR>", { noremap = true, silent = true })

Create an autocmd to hook into the toggle event and run custom code

-- The event data property will contain a string with either "default" or "light" respectively
vim.api.nvim_create_autocmd("User", {
    pattern = "CyberdreamToggleMode",
    callback = function(event)
        -- Your custom code here!
        -- For example, notify the user that the colorscheme has been toggled
        print("Switched to " .. event.data .. " mode!")
    end,
})

image

🤝 Contributing

Pull requests are welcome. If a plugin you use is not supported, please open an issue and I'll try to add support for it. If you have any suggestions or feedback, please open an issue.