https://github.com/daschw/leaf.nvim
A forest green dark & light colorscheme for Neovim
https://github.com/daschw/leaf.nvim
Last synced: 3 months ago
JSON representation
A forest green dark & light colorscheme for Neovim
- Host: GitHub
- URL: https://github.com/daschw/leaf.nvim
- Owner: daschw
- License: mit
- Created: 2022-03-23T22:26:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T16:58:09.000Z (about 1 year ago)
- Last Synced: 2025-03-26T04:41:21.715Z (4 months ago)
- Language: Lua
- Homepage:
- Size: 2.51 MB
- Stars: 66
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
# leaf.nvim
Neovim colorscheme based on the awesome [Leaf KDE Plasma Theme](https://github.com/qewer33/leaf-kde) 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.
```lua
use "daschw/leaf.nvim"
```## Requirements
- neovim >= 0.6
- truecolor terminal support
- undercurl terminal support (optional)## Usage
As simple as writing (pasting)
```vim
colorscheme leaf
``````lua
vim.cmd("colorscheme leaf")
```## Plugin Support
- [Nvim cmp](https://github.com/hrsh7th/nvim-cmp)
- [TreeSitter](https://github.com/nvim-treesitter/nvim-treesitter)
- [LSP Diagnostics](https://neovim.io/doc/user/lsp.html)
- [Git Signs](https://github.com/lewis6991/gitsigns.nvim)
- [Telescope](https://github.com/nvim-telescope/telescope.nvim)
- [NvimTree](https://github.com/kyazdani42/nvim-tree.lua)
- [Indent Blankline](https://github.com/lukas-reineke/indent-blankline.nvim)
- [Dashboard](https://github.com/glepnir/dashboard-nvim)
- [Lualine](https://github.com/nvim-lualine/lualine.nvim)
- [FloaTerm](https://github.com/voldikss/vim-floaterm)
- [Barbar](https://github.com/romgrk/barbar.nvim)
- [Neogit](https://github.com/TimUntersberger/neogit)
- [SmoothCursor](https://github.com/gen740/SmoothCursor.nvim)And many others should _"just work"_!
## Configuration
There is no need to call setup if you are ok with the defaults (low contrast).
```lua
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](lua/leaf/themes.lua) and the theme's colors are defined [here](lua/leaf/colors.lua).
For example, for comments matching the theme's dark green color you can call setup with:```lua
require("leaf").setup({
colors = { bg3 = "#59795f" },
})
```You can achieve the same result by accessing the colors defined for leaf.nvim:
```lua
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`.```lua
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](https://github.com/qewer33/leaf-kde) by @qewer33. I just ported the konsole colors to Neovim and kitty.
- I used [kanagawa.nvim](https://github.com/rebelot/kanagawa.nvim) by @rebelot as a template, since this is the first theme I made for Neovim.