leaf.nvim
leaf.nvim copied to clipboard
A forest green dark & light colorscheme for Neovim
leaf.nvim
Neovim colorscheme based on the awesome Leaf KDE Plasma Theme by @qewer33.
Theme gallery
There are low, medium and high contrast versions for both the dark and the light theme. The low contrast themes exactly match the colors from the corresponding KDE Plasma themes.
dark - high contrast
dark - medium contrast
dark - low contrast
light - low contrast
light - medium contrast
light - high contrast
Installation
Download with your favorite package manager.
use "daschw/leaf.nvim"
Requirements
- neovim >= 0.6
- truecolor terminal support
- undercurl terminal support (optional)
Usage
As simple as writing (pasting)
colorscheme leaf
vim.cmd("colorscheme leaf")
Plugin Support
- Nvim cmp
- TreeSitter
- LSP Diagnostics
- Git Signs
- Telescope
- NvimTree
- Indent Blankline
- Dashboard
- Lualine
- FloaTerm
- Barbar
- Neogit
- SmoothCursor
And many others should "just work"!
Configuration
There is no need to call setup if you are ok with the defaults (low contrast).
require("leaf").setup({
underlineStyle = "underline",
commentStyle = "italic",
functionStyle = "NONE",
keywordStyle = "italic",
statementStyle = "bold",
typeStyle = "NONE",
variablebuiltinStyle = "italic",
transparent = false,
colors = {},
overrides = {},
theme = "auto", -- default, based on vim.o.background, alternatives: "light", "dark"
contrast = "low", -- default, alternatives: "medium", "high"
})
-- setup must be called before loading
vim.cmd("colorscheme leaf")
Customize colors
You can change individual colors of leaf.nvim themes by passing a table of colors to setup.
Supported keywords can be found here and the theme's colors are defined here.
For example, for comments matching the theme's dark green color you can call setup with:
require("leaf").setup({
colors = { bg3 = "#59795f" },
})
You can achieve the same result by accessing the colors defined for leaf.nvim:
local leaf_colors = require("leaf.colors").setup()
require("leaf").setup({
colors = { bg3 = leaf_colors.leaf_green_3 },
})
Customize highlight groups
With the overrides keyword you can customize hl-groups.
Supported keywords are fg, bg, style, guisp and link.
require("leaf").setup({
overrides = {
Normal = { fg = "black", bg = "#FFFFFF" },
Comment = { style = "italic" },
TelescopeBorder = { link = "Normal" },
},
})
Acknowledgements
- Almost all colors are taken from the Leaf KDE Plasma Theme by @qewer33. I just ported the konsole colors to Neovim and kitty.
- I used kanagawa.nvim by @rebelot as a template, since this is the first theme I made for Neovim.