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
|
## ✨ 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)
|
+ [TreeSitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
||||||
+ [LSP Diagnostics](https://neovim.io/doc/user/lsp.html)
|
+ [LSP Diagnostics](https://neovim.io/doc/user/lsp.html)
|
||||||
+ [LSP Saga](https://github.com/glepnir/lspsaga.nvim)
|
+ [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)
|
+ [Indent Blankline](https://github.com/lukas-reineke/indent-blankline.nvim)
|
||||||
+ [Dashboard](https://github.com/glepnir/dashboard-nvim)
|
+ [Dashboard](https://github.com/glepnir/dashboard-nvim)
|
||||||
+ [BufferLine](https://github.com/akinsho/nvim-bufferline.lua)
|
+ [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
|
## 📦 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_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"]` |
|
| tokyonight_sidebars | `{}` | Set a darker background on sidebar-like windows. For example: `["quickfix", "__vista__", "terminal"]` |
|
||||||
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- Example config in Lua
|
-- Example config in Lua
|
||||||
vim.g.tokyonight_style = "night"
|
vim.g.tokyonight_style = "night"
|
||||||
@@ -95,3 +103,11 @@ let g:tokyonight_style = "night"
|
|||||||
let g:tokyonight_italic_functions = true
|
let g:tokyonight_italic_functions = true
|
||||||
let g:tokyonight_sidebars = [ "quickfix", "__vista__", "terminal" ]
|
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 = {}
|
local tokyonight = {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
local util = require("tokyonight.util")
|
local util = require("tokyonight.util")
|
||||||
local config = require("tokyonight.config")
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
---@param config Config
|
||||||
|
---@return ColorScheme
|
||||||
|
function M.setup(config)
|
||||||
|
config = config or require("tokyonight.config")
|
||||||
|
|
||||||
-- Color Palette
|
-- Color Palette
|
||||||
---@class ColorScheme
|
---@class ColorScheme
|
||||||
@@ -33,6 +39,7 @@ local colors = {
|
|||||||
diff = { change = "#394b70", add = "#164846", delete = "#823c41" },
|
diff = { change = "#394b70", add = "#164846", delete = "#823c41" },
|
||||||
git = { change = "#6183bb", add = "#449dab", delete = "#914c54" },
|
git = { change = "#6183bb", add = "#449dab", delete = "#914c54" },
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.style == "night" then colors.bg = "#1a1b26" end
|
if config.style == "night" then colors.bg = "#1a1b26" end
|
||||||
util.bg = colors.bg
|
util.bg = colors.bg
|
||||||
colors.git.ignore = colors.dark3
|
colors.git.ignore = colors.dark3
|
||||||
@@ -52,8 +59,8 @@ colors.error = colors.red1
|
|||||||
colors.warning = colors.yellow
|
colors.warning = colors.yellow
|
||||||
colors.info = colors.teal
|
colors.info = colors.teal
|
||||||
colors.hint = colors.info
|
colors.hint = colors.info
|
||||||
|
|
||||||
-- util.fg = colors.fg
|
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
end
|
||||||
|
|
||||||
|
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 util = require("tokyonight.util")
|
||||||
local theme = require("tokyonight.theme")
|
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,11 +1,18 @@
|
|||||||
local util = require("tokyonight.util")
|
local util = require("tokyonight.util")
|
||||||
local config = require("tokyonight.config")
|
local colors = require("tokyonight.colors")
|
||||||
local c = require("tokyonight.colors")
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
---@param config Config
|
||||||
|
---@return Theme
|
||||||
|
function M.setup(config)
|
||||||
|
config = config or require("tokyonight.config")
|
||||||
|
|
||||||
---@class Theme
|
---@class Theme
|
||||||
local theme = {}
|
local theme = {}
|
||||||
theme.config = config
|
theme.config = config
|
||||||
theme.colors = c
|
theme.colors = colors.setup(config)
|
||||||
|
local c = theme.colors
|
||||||
|
|
||||||
theme.base = {
|
theme.base = {
|
||||||
Comment = { fg = c.comment, style = config.commentStyle }, -- any comment
|
Comment = { fg = c.comment, style = config.commentStyle }, -- any comment
|
||||||
@@ -302,5 +309,6 @@ if config.hideInactiveStatusline then
|
|||||||
end
|
end
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
end
|
||||||
|
|
||||||
-- vi:nowrap
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user