Skip to content
프로젝트

소개

코드와 함께하는 차분한 동반자. Lua로 작성된 Neovim 미니멀 테마입니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Koda

Code's quiet companion

A minimalist theme for Neovim, written in Lua

koda

Variant Previews

Dark
Light
Moss
Glade

Installation

Using lazy.nvim:

{
  "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,
}

Using vim.pack:

vim.pack.add({
  "https://github.com/oskarnurm/koda.nvim",
})
-- require("koda").setup({ transparent = true })
vim.cmd("colorscheme koda")

Selecting Variants

Koda provides two ways to select variants:

1. Automatic: colorscheme koda will automatically switch between your preferred light and dark variants when the system background changes. You can configure these variants during setup:

require("koda").setup({
  theme = { dark = "moss", light = "glade" }
})
vim.cmd("colorscheme koda") -- auto-switches between 'moss' and 'glade'

2. Locked: Use a specific variant like colorscheme koda-moss to lock the theme, regardless of background settings:

" Explicitly set a variant:
colorscheme koda-dark
colorscheme koda-light
colorscheme koda-moss
colorscheme koda-glade

Default Configuration

[!IMPORTANT] Configure setup BEFORE calling vim.cmd("colorscheme koda").

require("koda").setup({
    transparent = false, -- enable for transparent backgrounds

    -- Set the variants to use when auto-switching based on vim.o.background
    -- Valid values: 'dark', 'light', 'moss', 'glade'
    theme = {
      dark = "dark",
      light = "light",
    },

    -- Automatically enable highlights only for plugins installed by your plugin manager
    -- Currently only supports `lazy.nvim`, `mini.deps` and `vim.pack`
    auto = true,  -- disable to load ALL available plugin highlights

    cache = true, -- caches the theme 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 for the active variant
    -- Available keys (e.g., 'func') can be found in lua/koda/palette/
    colors = {
      -- Apply to all variants:
      -- func = "#4078F2",

      -- Or override per variant:
      -- dark = { func = "#4078F2" },
      -- moss = { keyword = "#A627A4" },
    },

    -- 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)
      -- 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,
})

API

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("dark") -- returns the colors for the given theme with 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

You can also manually clear Koda's cache and reload the highlights by running:

:KodaFetch

Supported Plugins

Language support

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.

Extras

Extra color configs for WezTerm, Ghostty, Lazygit, fzf and others can be found in extras. To use them, refer to their respective documentation.

관련 프로젝트 살펴보기

불러오는 중…