Skip to content

Commit

Permalink
Revert "feat: add support of light theme" (yetone#196)
Browse files Browse the repository at this point in the history
This reverts commit 8b55833.
  • Loading branch information
yetone authored Aug 24, 2024
1 parent 8b55833 commit 303928d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
4 changes: 0 additions & 4 deletions lua/avante/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ M.defaults = {
hints = {
enabled = true,
},
--- @class AvanteThemeConfig
--- @field theme "light" | "dark"
--- @type string
theme = "dark",
}

---@type avante.Config
Expand Down
27 changes: 8 additions & 19 deletions lua/avante/highlights.lua
Original file line number Diff line number Diff line change
@@ -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",
}

Expand All @@ -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 })

Expand Down
4 changes: 2 additions & 2 deletions lua/avante/sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 303928d

Please sign in to comment.