Skip to content

Latest commit

 

History

History
392 lines (349 loc) · 14.9 KB

README.md

File metadata and controls

392 lines (349 loc) · 14.9 KB

Kimbox

Kimbox is a dark colorscheme for Neovim with builtin treesitter support. It is my variation of the original Kimbie Dark colorscheme.

The colors may look duller in the images provided, though they will not be whenever the colorscheme is actually loaded. I've noticed that many other colorschemes seem brighter than what their images show.

Installation

  • vim-plug
Plug 'lmburns/kimbox'

colorscheme kimbox
  • Packer
use({"lmburns/kimbox", config = [[require("kimbox").load()]]})
-- or
use({
    "lmburns/kimbox",
    config = function()
        require("kimbox").setup({
            -- options
        })
        require("kimbox").load()
        -- or
        vim.cmd("colorscheme kimbox")
    end,
})
  • Bufferline
-- Colors can be accessed with
local c = require("kimbox.bufferline").colors()

-- Theme itself
local t = require("kimbox.bufferline").theme()

require("bufferline").setup({
  -- configuration stuff
  highlights = require("kimbox.bufferline").theme()
})
  • Lualine
-- Colors can be accessed with
local c = require("kimbox.lualine").colors()

-- Theme itself
local t = require("kimbox.lualine").theme()

require("lualine").setup({
  -- configuration stuff
  theme = 'kimbox' -- 'auto' works as well
})

Color

#39260E #291804 #EF1D55 #DC3958 #FF5813 #FF9500 #819C3B
#39260E #291804 #EF1D55 #DC3958 #FF5813 #FF9500 #819C3B
#7EB2B1 #4C96A8 #98676A #A06469 #7F5D38 #A89984 #D9AE80
#7EB2B1 #4C96A8 #98676A #A06469 #7F5D38 #A89984 #D9AE80

Options (Lua)

-- These options can also be set using:
vim.g.kimbox_config = {
  -- ...options from above
}

require("kimbox").setup({
    ---Background color:
    ---    burnt_coffee : #231A0C   -- legacy: "medium"
    ---    cannon       : #221A02   -- legacy: "ocean"
    ---    used_oil     : #221A0F   -- legacy: "vscode"
    ---    deep         : #0F111B
    ---    zinnwaldite  : #291804   -- legacy: "darker"
    ---    eerie        : #1C0B28
    style = "cannon",
    ---Allow changing background color
    toggle_style = {
        ---Key used to cycle through the backgrounds in `toggle_style.bgs`
        key = "<Leader>ts",
        ---List of background names
        bgs = require("kimbox.config").bg_colors
    },
    ---New Lua-Treesitter highlight groups
    ---See below (New Lua Treesitter Highlight Groups) for an explanation
    ---  Location where Treesitter capture groups changed to '@capture.name'
    ---  Commit:    030b422d1
    ---  Vim patch: patch-8.2.0674
    langs08 = true,
    ---Used with popup menus (coc.nvim mainly) --
    popup = {
        background = false, -- use background color for PMenu
    },
    -- ━━━ Plugin Related ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    diagnostics = {
        background = true, -- use background color for virtual text
    },
    -- ━━━ General Formatting ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    allow_bold = true,
    allow_italic = false,
    allow_underline = false,
    allow_undercurl = true,
    allow_reverse = false,
    transparent = false,   -- don't set background
    term_colors = true,    -- if true enable the terminal
    ending_tildes = false, -- show the end-of-buffer tildes
    -- ━━━ Custom Highlights ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    ---Override default colors
    ---@type table<Kimbox.Color.S_t, string>
    colors = {},
    ---Override highlight groups
    ---@type Kimbox.Highlight.Map
    highlights = {},
    ---Plugins and langauges that can be disabled
    ---To view options: print(require("kimbox.highlights").{langs,langs08,plugins})
    ---@type {langs: Kimbox.Highlight.Langs[], langs08: Kimbox.Highlight.Langs08[], plugins: Kimbox.Highlight.Plugins[]}
    disabled = {
        ---Disabled languages
        ---@see Kimbox.Highlight.Langs
        langs = {},
        ---Disabled languages with '@' treesitter highlights
        ---@see Kimbox.Highlight.Langs08
        langs08 = {},
        ---Disabled plugins
        ---@see Kimbox.Highlight.Plugins
        plugins = {},
    },
    ---Run a function before the colorscheme is loaded
    ---@type fun(): nil
    run_before = nil,
    ---Run a function after the colorscheme is loaded
    ---@type fun(): nil
    run_after = nil,
})

require("kimbox").load()

Options (vimscript)

" an example
let g:kimbox_config = #{
    \ style: 'cannon',
    \ toggle_style: #{
    \   key: '<Leader>ts',
    \   bgs: [
    \     'burnt_coffee',
    \     'cannon',
    \     'used_oil',
    \     'deep',
    \     'zinnwaldite',
    \     'eerie',
    \   ]
    \ },
    \ langs08: v:false,
    \ diagnostics: #{background: v:true},
    \ popup:       #{background: v:false},
    \ allow_bold: v:true,
    \ allow_italic: v:false,
    \ allow_underline: v:false,
    \ allow_undercurl: v:true,
    \ allow_reverse: v:false,
    \ transparent: v:false,
    \ term_colors: v:true,
    \ ending_tildes: v:false,
    \ colors: [],
    \ highlights: [],
    \ disabled: #{
    \   langs:   [],
    \   langs08: [],
    \   plugins: [],
    \ },
    \ run_before: v:null,
    \ run_after: v:null,
    \ }

colorscheme kimbox

Overriding highlight groups

require("kimbox").setup({
    colors = {
        bright_orange = "#ff8800", -- define a new color
        green = "#77A172",         -- redefine an existing color
        myblue = "#418292",
    },
    highlights = {
        TSKeyword = {fg = "$green"},
        TSString = {fg = "$bright_orange", bg = "#FF5813", gui = "bold"},
        TSFunction = {fg = "#88C0D0", sp = "$aqua", gui = "underline,italic"},
        ["@function.macro.lua"] = {fg = "$myblue", sp = "$aqua", gui = "underline,italic"},
    },
})

New Lua Treesitter Highlight Groups

See :h lua-treesitter-highlight-groups for a full explanation.

After the commit 030b422d1, highlight groups were changed in the following pattern:

  • luaTSFunction => @function.lua
  • vimdocTSTitle => @text.title.vimdoc
  • etc.

This feature will not yet be enabled by default. If you wish to use this colorscheme and wish to have the exact same colors as the highlight groups that were present before the aforementioned commit, set the configuration feature langs08 to true in your configuration. This feature will eventually be this colorschemes default settings.

Filetype Support

Treesitter is preferred for most file types (not Zsh). All of the following languages have been manually configured.

Support
  • Awk

  • Bash/Dash

  • C/C++

  • Clojure

  • CoffeeScript

  • Dart

  • Elixir

  • Erlang

  • Go

  • Haskell

  • HTML

  • Javascript

  • JavascriptReact TypescriptReact

  • Kotlin

  • Lua

  • OCaml

  • ObjectiveC

  • PHP

  • Perl

  • Python

  • R

  • Ruby

  • Rust

  • Scala

  • Sed

  • Solidity

  • Swift

  • Teal

  • Typescript

  • TypescriptReact (.tsx)

  • Vimscript

  • Zig

  • Zsh

  • CSS

  • SCSS

  • GraphQL

  • JQ

  • Comments

  • Vimdoc (Vim help)

  • LuaDoc (Lua documentation comments)

  • Luap (Lua patterns)

  • Query (.scm, Treesitter query syntax)

  • Regex

  • Latex

  • Markdown

  • Matlab

  • sxhkdrc

  • CMake

  • Makefile

  • Git Commit

  • Git Config

  • Git Ignore

  • DosIni (.ini)

  • JSON

  • RON (Rust Object Notation)

  • TOML

  • YAML

Plugin Support

  • If any plugin is not supported and you would like for it to be, please let me know.
Support

Name

The name came about because I had originally thought I was going to create a combination of the kimbie dark and gruvbox colorschemes. It's too late to change it now.

Extras

  • There is a supplemental TextMate theme in the extras directory. This can be used with bat or SublimeText.
  • There are also files which can be used with wezterm. One is the theme itself, and the other contains configuration options to setup the theme.

TODO

  • Create some sort of documentation
  • Create a compiled version similar to nightfox

Thanks to