From 303928de8893529c6a3dad523f77cdee5dbb0e50 Mon Sep 17 00:00:00 2001 From: yetone Date: Sun, 25 Aug 2024 00:59:49 +0800 Subject: [PATCH] Revert "feat: add support of light theme" (#196) This reverts commit 8b55833db646f0acb5481ee21f98a426da4a93e9. --- lua/avante/config.lua | 4 ---- lua/avante/highlights.lua | 27 ++++++++------------------- lua/avante/sidebar.lua | 4 ++-- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/lua/avante/config.lua b/lua/avante/config.lua index 32d58b2a2..e5115219b 100644 --- a/lua/avante/config.lua +++ b/lua/avante/config.lua @@ -123,10 +123,6 @@ M.defaults = { hints = { enabled = true, }, - --- @class AvanteThemeConfig - --- @field theme "light" | "dark" - --- @type string - theme = "dark", } ---@type avante.Config diff --git a/lua/avante/highlights.lua b/lua/avante/highlights.lua index c6988994c..1bd2d3158 100644 --- a/lua/avante/highlights.lua +++ b/lua/avante/highlights.lua @@ -1,13 +1,12 @@ local api = vim.api -local Config = require("avante.config") local M = { TITLE = "AvanteTitle", REVERSED_TITLE = "AvanteReversedTitle", SUBTITLE = "AvanteSubtitle", REVERSED_SUBTITLE = "AvanteReversedSubtitle", - THIRDTITLE = "AvanteThirdTitle", - REVERSED_THIRDTITLE = "AvanteReversedThirdTitle", + THRIDTITLE = "AvanteThirdTitle", + REVERSED_THRIDTITLE = "AvanteReversedThirdTitle", REVERSED_NORMAL = "AvanteReversedNormal", } @@ -19,22 +18,12 @@ M.setup = function() local normal_float = api.nvim_get_hl(0, { name = "NormalFloat" }) api.nvim_set_hl(0, M.REVERSED_NORMAL, { fg = normal.bg }) - - if Config.defaults.theme == "light" then - api.nvim_set_hl(0, M.TITLE, { fg = "#1e222a", bg = "#98c379" }) - api.nvim_set_hl(0, M.REVERSED_TITLE, { fg = "#98c379" }) - api.nvim_set_hl(0, M.SUBTITLE, { fg = "#1e222a", bg = "#7998c3" }) - api.nvim_set_hl(0, M.REVERSED_SUBTITLE, { fg = "#7998c3" }) - api.nvim_set_hl(0, M.THIRDTITLE, { fg = "#1e222a", bg = "#a479c3" }) - api.nvim_set_hl(0, M.REVERSED_THIRDTITLE, { fg = "#a479c3" }) - else - api.nvim_set_hl(0, M.TITLE, { fg = "#1e222a", bg = "#98c379" }) - api.nvim_set_hl(0, M.REVERSED_TITLE, { fg = "#98c379" }) - api.nvim_set_hl(0, M.SUBTITLE, { fg = "#1e222a", bg = "#56b6c2" }) - api.nvim_set_hl(0, M.REVERSED_SUBTITLE, { fg = "#56b6c2" }) - api.nvim_set_hl(0, M.THIRDTITLE, { fg = "#ABB2BF", bg = "#353B45" }) - api.nvim_set_hl(0, M.REVERSED_THIRDTITLE, { fg = "#353B45" }) - end + api.nvim_set_hl(0, M.TITLE, { fg = "#1e222a", bg = "#98c379" }) + api.nvim_set_hl(0, M.REVERSED_TITLE, { fg = "#98c379" }) + api.nvim_set_hl(0, M.SUBTITLE, { fg = "#1e222a", bg = "#56b6c2" }) + api.nvim_set_hl(0, M.REVERSED_SUBTITLE, { fg = "#56b6c2" }) + api.nvim_set_hl(0, M.THRIDTITLE, { fg = "#ABB2BF", bg = "#353B45" }) + api.nvim_set_hl(0, M.REVERSED_THRIDTITLE, { fg = "#353B45" }) api.nvim_set_hl(M.hint_ns, "NormalFloat", { fg = normal_float.fg, bg = normal_float.bg }) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index f1caca340..734e719f0 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -431,8 +431,8 @@ function Sidebar:render_input_container() self.input_container.winid, self.input_container.bufnr, header_text, - Highlights.THIRDTITLE, - Highlights.REVERSED_THIRDTITLE + Highlights.THRIDTITLE, + Highlights.REVERSED_THRIDTITLE ) end