Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mac Clear

Mac Clear is a Neovim theme ported from the MacOS Terminal themes: Clear Dark and Clear Light.

mac clear light screenshot

mac clear dark screenshot

Requirements

  • Neovim >= 0.12 (Actually I don't check if it works for lower versions...hope it does! )

Better Experience

Installation

Using Neovim's native package manager:

vim.pack.add({ "https://github.com/boningmaple/mac-clear" })

Usage

Use mac-clear to automatically switch between light and dark mode based on your system mode.

vim.cmd.colorscheme("mac-clear")

Or choose light or dark directly:

-- light
vim.cmd.colorscheme("mac-clear-light")

-- dark
vim.cmd.colorscheme("mac-clear-dark")

You do not need to call setup() or configure anything unless you want to override colors or highlight groups.

Overrides

Call setup() before running vim.cmd.colorscheme("mac-clear") if you want to customize it.

Note

Check lua/mac-clear/colors.lua for available colors, lua/mac-clear/groups for more highlight group examples and lua/lualine/themes/mac-clear-init.lua for lualine.

require("mac-clear").setup({
    colors_overrides = function(theme)
        return {
            -- One color for both light and dark.
            blue = "#ad64be",

            -- Or use different colors for light and dark.
            magenta = theme == "light" and "#ffffff" or "#abcabc",

            -- Or define a new color that is not in this colorscheme
            new_color = theme == "light" and "#b44444" or "#b55555",
        }
    end,

    groups_overrides = function(theme, colors)
        return {
            -- Use colors directly.
            Normal = { bg = "#000000", fg = "#ffffff" },

            -- Or use the colors.
            Keyword = { fg = colors.magenta },

            -- Or use different colors for light and dark.
            Function = { fg = theme == "light" and colors.blue or colors.red },

            -- Or use your new color
            Identifier = { fg = colors.new_color },
        }
    end,

    lualine_overrides = function(theme, colors)
        return {
            -- Use colors directly.
            normal = {
                a = { bg = "#000000", fg = "#ffffff", gui = "bold" },
            },

            -- Or use the colors.
            insert = {
                a = { bg = colors.black, fg = colors.white, gui = "bold" },
            },

            -- Or use different colors for light and dark.
            visual = {
                a = { bg = theme == "light" and colors.blue or colors.red, fg = colors.white, gui = "bold" },
            },

            -- Or use your new color
            terminal = {
                a = { bg = colors.new_color, fg = colors.white, gui = "bold" },
            },
        }
    end,
})

vim.cmd.colorscheme("mac-clear")

About

A Neovim theme ported from MacOS Terminal Clear Light/Dark

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages