Skip to content

titembaatar/sarnai.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

146 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sarnai.nvim

ᠰᠠᠷᠠᠨᠠᠢ

This is the Neovim colorscheme repository for sarnai. The theme repository (including palettes, integration, etc...) is at: titembaatar/sarnai

Features

  • Dark Khavar and light Ovol variants
  • Aim to reduce eye strain
  • Treesitter integration
  • Some plugin compatibility
  • Customisable
  • Caching

Installation

Using lazy.nvim

{
  url = "https://codeberg.org/titembaatar/sarnai.nvim.git",
  lazy = false,
  priority = 1000,
  opts = {
    -- your configuration comes here
    -- leave it empty to use the default settings
    style = "khavar",    -- khavar or ovol
    transparent = false, -- true enables transparent background
  },
}

Screenshots

Dark Khavar

Khavar Theme

Light Ovol

Ovol Theme

Usage

After installation, you can set the colorscheme using in your init.lua

vim.cmd.colorscheme("sarnai")        -- Default (follows `vim.o.background`)
vim.cmd.colorscheme("sarnai-khavar") -- Explicitly dark theme
vim.cmd.colorscheme("sarnai-ovol")   -- Light theme

Configuration

sarnai.nvim comes with these defaults:

require("sarnai").setup({
  -- The theme style: "khavar" (dark) or "ovol" (light)
  style = "khavar",

  -- Enable transparent background
  transparent = false,

  -- Set terminal colors
  terminal_colors = true,

  -- Configure syntax highlighting styles
  styles = {
    -- Set to false to disable a style globally
    italic = true,
    bold = true,
    underline = true,
    undercurl = true,
    strikethrough = true,

    -- Specific syntax elements
    comments = { italic = true },
    keywords = {},
    functions = {},
    variables = {},
  },

  -- Plugin integration
  plugins = {
    -- Enable all plugins by default (when not using lazy.nvim)
    all = true,

    -- Auto-detect plugins via lazy.nvim
    auto = true,

    -- Override specific plugins
    -- trouble = false,
  },

  -- Enable caching for better performance
  cache = true,

  -- Override colors
  on_colors = function(colors)
    -- Example: Customize the pink palette colors
    -- colors.palette.sarnai = "#e5a3ab"
    -- Example: Customize the syntax boolean elements
    -- colors.syntax.boolean = "#ff0000"
  end,

  -- Override highlights groups
  on_highlights = function(groups, colors)
    -- Example: Custom comment styling
    -- groups.Comment = { fg = colors.palette.muted, italic = true }
    -- Example: Custom mini.statusline highlights
    -- groups.MiniStatuslineModeInsert  = { bg = colors.palette.yargui },
  end,
})

Supported Plugins

sarnai.nvim provides highlighting for the following plugins.

Up to date

  • blink.cmp (completion)
  • trouble.nvim (diagnostics viewer)
  • render-markdown.nvim (markdown)
  • snacks.nvim (collection of QoL plugins)
    • snacks.dashboard
    • snacks.notifier
  • mini.nvim (collection of modules)
    • mini.surround
    • mini.diff
    • mini.files
    • mini.cursorword
    • mini.hipatterns
    • mini.indentscope
    • mini.statusline
    • mini.tabline

No longer maintained

Contributing

This theme is personal so I will not contribute to add highlights to plugins I do not use. However, feel free to make a pull request for that. Regarding issues, report them, and I will take a look into it if time allows.

About

[mirror] sarnai - A Mongolian-inspired colorscheme for neovim

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages