Please open an issue if you notice any problems, or if a plugin you think should have explicit support is missing from the list.
{
"oskarnurm/koda.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- require("koda").setup({ transparent = true })
vim.cmd("colorscheme koda")
end,
}
vim.pack.add({
"https://github.com/oskarnurm/koda.nvim",
})
-- require("koda").setup({ transparent = true })
vim.cmd("colorscheme koda")
[!IMPORTANT] Set the configuration BEFORE calling
vim.cmd("colorscheme koda").
require("koda").setup({
transparent = false, -- enable for transparent backgrounds
-- Automatically enable highlights only for plugins installed by your plugin manager
-- Currently supports `lazy.nvim`, `mini.deps` and `vim.pack`
-- Disable this to load ALL available plugin highlights
auto = true,
cache = true, -- cache for better performance
-- Style to be applied to different syntax groups
-- Common use case would be to set either `italic = true` or `bold = true` for a desired group
-- See `:help nvim_set_hl` for more valid values
styles = {
functions = { bold = true },
keywords = {},
comments = {},
strings = {},
constants = {}, -- includes numbers, booleans
},
-- Override colors
-- These will be merged into the active palette (Dark or Light)
-- Example default palette for dark background:
colors = {
bg = "#101010",
fg = "#b0b0b0",
dim = "#000000",
line = "#272727",
keyword = "#777777",
comment = "#50585d",
border = "#ffffff",
emphasis = "#ffffff",
func = "#ffffff",
string = "#ffffff",
char = "#ffffff",
const = "#d9ba73",
highlight = "#458ee6",
info = "#8ebeec",
success = "#86cd82",
warning = "#d9ba73",
danger = "#ff7676",
green = "#14ba19",
orange = "#f54d27",
red = "#701516",
pink = "#f2a4db",
cyan = "#5abfb5",
},
-- You can modify or extend highlight groups using the `on_highlights` configuration option
-- Any changes made take effect when highlights are applied
on_highlights = function(hl, c) end,
})
-- Override specific palette colors or any highlights to your liking
-- Note: The palette key names (e.g., 'func') must match those found
-- in Koda's internal configuration (see above)
require("koda").setup({
colors = {
func = "#4078F2", -- changes the color of functions
keyword = "#A627A4", -- changes the color of keywords
char = "#f2a4db", -- make characters pop out more by adding a different color
},
on_highlights = function(hl, c)
hl.LineNr = { fg = c.info } -- change a specific highlight to use a different palette color
hl.Comment = { fg = c.emphasis, italic = true } -- modify a syntax group (add bold, italic, etc)
hl.RainbowDelimiterRed = { fg = "#fb2b2b" } -- add a custom highlight group for another plugin
end,
})
Koda exposes a few utility functions to allow users to integrate the theme with other parts of their configuration.
local koda = require("koda")
local colors = koda.get_palette() -- returns the active palette (dark or light) with any of your user overrides applied
some_plugin.error = koda.blend(colors.danger, colors.bg, 0.3) -- blends two colors together. Useful for creating custom shades that match the theme
Most languages have sensible defaults thanks to Neovim's built-in queries, so I've opted not to add anything language-specific to keep the footprint smaller. Feel free to open an issue.
Extra color configs for WezTerm, Ghostty, Lazygit, fzf and others can be found in extras. To use them, refer to their respective documentation.