feat: added kitty color schemes
This commit is contained in:
20
README.md
20
README.md
@@ -13,6 +13,15 @@ A dark Neovim theme written in Lua ported from the Visual Studio Code [TokyoNigh
|
||||
|
||||
## ✨ Features
|
||||
|
||||
+ supports the latest Neovim 5.0 features like TreeSitter and LSP
|
||||
+ minimal inactive statusline
|
||||
+ vim terminal colors
|
||||
+ darker background for sidebar-like windows
|
||||
+ color configs for [Kitty](https://sw.kovidgoyal.net/kitty/conf.html?highlight=include)
|
||||
+ **lualine** theme
|
||||
|
||||
### Plugin Support
|
||||
|
||||
+ [TreeSitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
+ [LSP Diagnostics](https://neovim.io/doc/user/lsp.html)
|
||||
+ [LSP Saga](https://github.com/glepnir/lspsaga.nvim)
|
||||
@@ -24,7 +33,7 @@ A dark Neovim theme written in Lua ported from the Visual Studio Code [TokyoNigh
|
||||
+ [Indent Blankline](https://github.com/lukas-reineke/indent-blankline.nvim)
|
||||
+ [Dashboard](https://github.com/glepnir/dashboard-nvim)
|
||||
+ [BufferLine](https://github.com/akinsho/nvim-bufferline.lua)
|
||||
+ a TokyNight [Lualine](https://github.com/hoob3rt/lualine.nvim) theme is included
|
||||
+ [Lualine](https://github.com/hoob3rt/lualine.nvim)
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
@@ -81,7 +90,6 @@ The theme comes in two styles, `storm` and a darker variant `night`.
|
||||
| tokyonight_hide_inactive_statusline | `false` | Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. |
|
||||
| tokyonight_sidebars | `{}` | Set a darker background on sidebar-like windows. For example: `["quickfix", "__vista__", "terminal"]` |
|
||||
|
||||
|
||||
```lua
|
||||
-- Example config in Lua
|
||||
vim.g.tokyonight_style = "night"
|
||||
@@ -95,3 +103,11 @@ let g:tokyonight_style = "night"
|
||||
let g:tokyonight_italic_functions = true
|
||||
let g:tokyonight_sidebars = [ "quickfix", "__vista__", "terminal" ]
|
||||
```
|
||||
|
||||
## 🍭 Extras
|
||||
|
||||
Two color configs for **Kitty** can be found at [/extra](extra/). To use them, copy the color config you want to your Kitty condif directory and append the following in yout `kitty.conf`
|
||||
|
||||
```kitty
|
||||
include other.conf
|
||||
```
|
||||
|
||||
9
extra/build
Executable file
9
extra/build
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
||||
cd "$DIR/.."
|
||||
|
||||
export LUA_PATH="./lua/?/init.lua;./lua/?.lua"
|
||||
lua -e 'require"tokyonight.extra"'
|
||||
40
extra/kitty_tokyonight_night.conf
Normal file
40
extra/kitty_tokyonight_night.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
# TokyoNight colors for Kitty
|
||||
|
||||
background #1a1b26
|
||||
foreground #c0caf5
|
||||
selection_background #33467C
|
||||
selection_foreground #c0caf5
|
||||
url_color #73daca
|
||||
cursor #c0caf5
|
||||
|
||||
# Tabs
|
||||
active_tab_background #7aa2f7
|
||||
active_tab_foreground #1f2335
|
||||
inactive_tab_background #292e42
|
||||
inactive_tab_foreground #545c7e
|
||||
#tab_bar_background #15161E
|
||||
|
||||
# normal
|
||||
color0 #414868
|
||||
color1 #f7768e
|
||||
color2 #9ece6a
|
||||
color3 #e0af68
|
||||
color4 #7aa2f7
|
||||
color5 #bb9af7
|
||||
color6 #7dcfff
|
||||
color7 #a9b1d6
|
||||
|
||||
# bright
|
||||
color8 #414868
|
||||
color9 #f7768e
|
||||
color10 #9ece6a
|
||||
color11 #e0af68
|
||||
color12 #7aa2f7
|
||||
color13 #bb9af7
|
||||
color14 #7dcfff
|
||||
color15 #c0caf5
|
||||
|
||||
# extended colors
|
||||
color16 #ff9e64
|
||||
color17 #db4b4b
|
||||
|
||||
40
extra/kitty_tokyonight_storm.conf
Normal file
40
extra/kitty_tokyonight_storm.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
# TokyoNight colors for Kitty
|
||||
|
||||
background #24283b
|
||||
foreground #c0caf5
|
||||
selection_background #364A82
|
||||
selection_foreground #c0caf5
|
||||
url_color #73daca
|
||||
cursor #c0caf5
|
||||
|
||||
# Tabs
|
||||
active_tab_background #7aa2f7
|
||||
active_tab_foreground #1f2335
|
||||
inactive_tab_background #292e42
|
||||
inactive_tab_foreground #545c7e
|
||||
#tab_bar_background #1D202F
|
||||
|
||||
# normal
|
||||
color0 #414868
|
||||
color1 #f7768e
|
||||
color2 #9ece6a
|
||||
color3 #e0af68
|
||||
color4 #7aa2f7
|
||||
color5 #bb9af7
|
||||
color6 #7dcfff
|
||||
color7 #a9b1d6
|
||||
|
||||
# bright
|
||||
color8 #414868
|
||||
color9 #f7768e
|
||||
color10 #9ece6a
|
||||
color11 #e0af68
|
||||
color12 #7aa2f7
|
||||
color13 #bb9af7
|
||||
color14 #7dcfff
|
||||
color15 #c0caf5
|
||||
|
||||
# extended colors
|
||||
color16 #ff9e64
|
||||
color17 #db4b4b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local colors = require("tokyonight.colors")
|
||||
local colors = require("tokyonight.colors").setup()
|
||||
|
||||
local tokyonight = {}
|
||||
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
local util = require("tokyonight.util")
|
||||
local config = require("tokyonight.config")
|
||||
|
||||
-- Color Palette
|
||||
---@class ColorScheme
|
||||
local colors = {
|
||||
local M = {}
|
||||
|
||||
---@param config Config
|
||||
---@return ColorScheme
|
||||
function M.setup(config)
|
||||
config = config or require("tokyonight.config")
|
||||
|
||||
-- Color Palette
|
||||
---@class ColorScheme
|
||||
local colors = {
|
||||
none = "NONE",
|
||||
bg_dark = "#1f2335",
|
||||
bg = "#24283b",
|
||||
@@ -32,28 +38,29 @@ local colors = {
|
||||
red1 = "#db4b4b",
|
||||
diff = { change = "#394b70", add = "#164846", delete = "#823c41" },
|
||||
git = { change = "#6183bb", add = "#449dab", delete = "#914c54" },
|
||||
}
|
||||
if config.style == "night" then colors.bg = "#1a1b26" end
|
||||
util.bg = colors.bg
|
||||
colors.git.ignore = colors.dark3
|
||||
colors.black = util.darken(colors.bg, 0.8, "#000000")
|
||||
colors.border_highlight = colors.blue0
|
||||
colors.border = colors.black
|
||||
}
|
||||
|
||||
colors.bg_popup = colors.bg_dark
|
||||
colors.bg_sidebar = colors.bg_dark
|
||||
colors.bg_statusline = colors.bg_dark
|
||||
colors.bg_float = colors.bg
|
||||
colors.bg_visual = util.darken(colors.blue0, 0.7)
|
||||
colors.bg_search = colors.blue0
|
||||
colors.fg_sidebar = colors.fg_dark
|
||||
if config.style == "night" then colors.bg = "#1a1b26" end
|
||||
util.bg = colors.bg
|
||||
colors.git.ignore = colors.dark3
|
||||
colors.black = util.darken(colors.bg, 0.8, "#000000")
|
||||
colors.border_highlight = colors.blue0
|
||||
colors.border = colors.black
|
||||
|
||||
colors.error = colors.red1
|
||||
colors.warning = colors.yellow
|
||||
colors.info = colors.teal
|
||||
colors.hint = colors.info
|
||||
colors.bg_popup = colors.bg_dark
|
||||
colors.bg_sidebar = colors.bg_dark
|
||||
colors.bg_statusline = colors.bg_dark
|
||||
colors.bg_float = colors.bg
|
||||
colors.bg_visual = util.darken(colors.blue0, 0.7)
|
||||
colors.bg_search = colors.blue0
|
||||
colors.fg_sidebar = colors.fg_dark
|
||||
|
||||
-- util.fg = colors.fg
|
||||
colors.error = colors.red1
|
||||
colors.warning = colors.yellow
|
||||
colors.info = colors.teal
|
||||
colors.hint = colors.info
|
||||
return colors
|
||||
end
|
||||
|
||||
return colors
|
||||
return M
|
||||
|
||||
|
||||
16
lua/tokyonight/extra.lua
Normal file
16
lua/tokyonight/extra.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
local config = require("tokyonight.config")
|
||||
local kitty = require("tokyonight.kitty")
|
||||
|
||||
local function write(str, fileName)
|
||||
local file = io.open("extra/" .. fileName, "w")
|
||||
file:write(str)
|
||||
file:close()
|
||||
end
|
||||
|
||||
config.style = "storm"
|
||||
|
||||
write(kitty.kitty(config), "kitty_tokyonight_storm.conf")
|
||||
|
||||
config.style = "night"
|
||||
|
||||
write(kitty.kitty(config), "kitty_tokyonight_night.conf")
|
||||
@@ -1,4 +1,9 @@
|
||||
local util = require("tokyonight.util")
|
||||
local theme = require("tokyonight.theme")
|
||||
|
||||
return { colorscheme = function() util.load(theme) end }
|
||||
local M = {}
|
||||
|
||||
function M.colorscheme() util.load(theme.setup()) end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
54
lua/tokyonight/kitty.lua
Normal file
54
lua/tokyonight/kitty.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
local util = require("tokyonight.util")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.kitty(config)
|
||||
config = config or require("tokyonight.config")
|
||||
local colors = require("tokyonight.colors").setup(config)
|
||||
|
||||
local kitty = util.template([[
|
||||
# TokyoNight colors for Kitty
|
||||
|
||||
background ${bg}
|
||||
foreground ${fg}
|
||||
selection_background ${bg_visual}
|
||||
selection_foreground ${fg}
|
||||
url_color ${green1}
|
||||
cursor ${fg}
|
||||
|
||||
# Tabs
|
||||
active_tab_background ${blue}
|
||||
active_tab_foreground ${bg_dark}
|
||||
inactive_tab_background ${bg_highlight}
|
||||
inactive_tab_foreground ${dark3}
|
||||
#tab_bar_background ${black}
|
||||
|
||||
# normal
|
||||
color0 ${terminal_black}
|
||||
color1 ${red}
|
||||
color2 ${green}
|
||||
color3 ${yellow}
|
||||
color4 ${blue}
|
||||
color5 ${magenta}
|
||||
color6 ${cyan}
|
||||
color7 ${fg_dark}
|
||||
|
||||
# bright
|
||||
color8 ${terminal_black}
|
||||
color9 ${red}
|
||||
color10 ${green}
|
||||
color11 ${yellow}
|
||||
color12 ${blue}
|
||||
color13 ${magenta}
|
||||
color14 ${cyan}
|
||||
color15 ${fg}
|
||||
|
||||
# extended colors
|
||||
color16 ${orange}
|
||||
color17 ${red1}
|
||||
]], colors)
|
||||
return kitty
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
local util = require("tokyonight.util")
|
||||
local config = require("tokyonight.config")
|
||||
local c = require("tokyonight.colors")
|
||||
local colors = require("tokyonight.colors")
|
||||
|
||||
---@class Theme
|
||||
local theme = {}
|
||||
theme.config = config
|
||||
theme.colors = c
|
||||
local M = {}
|
||||
|
||||
theme.base = {
|
||||
---@param config Config
|
||||
---@return Theme
|
||||
function M.setup(config)
|
||||
config = config or require("tokyonight.config")
|
||||
|
||||
---@class Theme
|
||||
local theme = {}
|
||||
theme.config = config
|
||||
theme.colors = colors.setup(config)
|
||||
local c = theme.colors
|
||||
|
||||
theme.base = {
|
||||
Comment = { fg = c.comment, style = config.commentStyle }, -- any comment
|
||||
ColorColumn = { bg = c.bg_visual }, -- used for the columns set with 'colorcolumn'
|
||||
Conceal = { fg = c.fg_gutter }, -- placeholder characters substituted for concealed text (see 'conceallevel')
|
||||
@@ -134,9 +141,9 @@ theme.base = {
|
||||
-- These groups are for the native LSP client. Some other LSP clients may
|
||||
-- use these groups, or use their own. Consult your LSP client's
|
||||
-- documentation.
|
||||
}
|
||||
}
|
||||
|
||||
theme.plugins = {
|
||||
theme.plugins = {
|
||||
LspReferenceText = { bg = c.fg_gutter }, -- used for highlighting "text" references
|
||||
LspReferenceRead = { bg = c.fg_gutter }, -- used for highlighting "read" references
|
||||
LspReferenceWrite = { bg = c.fg_gutter }, -- used for highlighting "write" references
|
||||
@@ -278,18 +285,18 @@ theme.plugins = {
|
||||
BufferLineIndicatorSelected = { fg = c.git.change },
|
||||
BufferLineFill = { bg = c.black },
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-- LuaLine
|
||||
for _, section in ipairs({ "b", "c" }) do
|
||||
-- LuaLine
|
||||
for _, section in ipairs({ "b", "c" }) do
|
||||
local bg = c.bg_sidebar
|
||||
if section == "b" then bg = c.fg_gutter end
|
||||
theme.plugins["lualine_" .. section .. "_diagnostics_error_normal"] = { fg = c.error, bg = bg }
|
||||
theme.plugins["lualine_" .. section .. "_diagnostics_warn_normal"] = { fg = c.warning, bg = bg }
|
||||
theme.plugins["lualine_" .. section .. "_diagnostics_info_normal"] = { fg = c.info, bg = bg }
|
||||
end
|
||||
end
|
||||
|
||||
if config.hideInactiveStatusline then
|
||||
if config.hideInactiveStatusline then
|
||||
local inactive = { style = "underline", bg = c.bg, fg = c.bg, sp = c.border }
|
||||
|
||||
-- StatusLineNC
|
||||
@@ -299,8 +306,9 @@ if config.hideInactiveStatusline then
|
||||
for _, section in ipairs({ "a", "b", "c" }) do
|
||||
theme.plugins["lualine_" .. section .. "_inactive"] = inactive
|
||||
end
|
||||
end
|
||||
|
||||
return theme
|
||||
end
|
||||
|
||||
return theme
|
||||
|
||||
-- vi:nowrap
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user