From 2bbe65e0c3d2a895519be34fc51315616b43240b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 20 Apr 2021 22:43:54 +0200 Subject: [PATCH] feat: dark background for sidebars & floats is now configurable --- README.md | 2 ++ lua/tokyonight/colors.lua | 8 ++++++-- lua/tokyonight/config.lua | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e78366b..a2bc84c 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ The theme comes in two styles, `storm` and a darker variant `night`. | tokyonight_transparent | `false` | Enable this to disable setting the background color | | 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_dark_sidebar | `true` | Sidebar like windows like `NvimTree` get a darker background | +| tokyonight_dark_float | `true` | Float windows like the lsp diagnostics windows get a darker background. | ```lua -- Example config in Lua diff --git a/lua/tokyonight/colors.lua b/lua/tokyonight/colors.lua index 93aec16..bc2538a 100644 --- a/lua/tokyonight/colors.lua +++ b/lua/tokyonight/colors.lua @@ -47,10 +47,14 @@ function M.setup(config) colors.border_highlight = colors.blue0 colors.border = colors.black + -- Popups and statusline always get a dark background colors.bg_popup = colors.bg_dark - colors.bg_sidebar = colors.bg_dark colors.bg_statusline = colors.bg_dark - colors.bg_float = colors.bg + + -- Sidebar and Floats are configurable + colors.bg_sidebar = config.darkFloat and colors.bg_dark or colors.bg + colors.bg_float = config.darkFloat and colors.bg_dark or colors.bg + colors.bg_visual = util.darken(colors.blue0, 0.7) colors.bg_search = colors.blue0 colors.fg_sidebar = colors.fg_dark diff --git a/lua/tokyonight/config.lua b/lua/tokyonight/config.lua index 0bebce3..8e607c9 100644 --- a/lua/tokyonight/config.lua +++ b/lua/tokyonight/config.lua @@ -21,6 +21,8 @@ config = { terminalColors = opt("terminal_colors", true), sidebars = opt("sidebars", {}), dev = opt("dev", false), + darkFloat = opt("dark_float", true), + darkSidebar = opt("dark_sidebar", true), } return config