Closed Mouthless-Stoat closed 1 year ago
I try changing my header color foreground but it seem that only background work. Config
{ "goolord/alpha-nvim", event = "VimEnter", opts = function() local dashboard = require("alpha.themes.dashboard") local logo = { [[ . . ]], [[ ';;,. ::' ]], [[ ,:::;,, :ccc, ]], [[,::c::,,,,. :cccc, :::: ::: :::::::::: :::::::: ::: ::: ::::::::::: :::: :::: ]], [[,cccc:;;;;;. cllll, :+:+: :+: :+: :+: :+: :+: :+: :+: +:+:+: :+:+:+ ]], [[,cccc;.;;;;;, cllll; :+:+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+:+ +:+ ]], [[:cccc; .;;;;;;. coooo; +#+ +:+ +#+ +#++:++# +#+ +:+ +#+ +:+ +#+ +#+ +:+ +#+ ]], [[;llll; ,:::::'loooo; +#+ +#+#+# +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ ]], [[;llll: ':::::loooo: #+# #+#+# #+# #+# #+# #+#+#+# #+# #+# #+# ]], [[:oooo: .::::llodd: ### #### ########## ######## ### ########### ### ### ]], [[.;ooo: ;cclooo:. ]], [[ .;oc 'coo;. ]], [[ .' .,. ]], } dashboard.section.header.val = logo dashboard.section.buttons.val = { dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"), dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"), dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"), dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"), dashboard.button("q", " " .. " Quit", ":qa<CR>"), } for _, button in ipairs(dashboard.section.buttons.val) do button.opts.hl = "AlphaButtons" button.opts.hl_shortcut = "AlphaShortcut" end dashboard.section.header.opts.hl = { { "AlphaHeaderFG", 0, 10 }, { "AlphaHeaderBG", 10, -1} } dashboard.section.buttons.opts.hl = "AlphaButtons" dashboard.section.footer.opts.hl = "AlphaFooter" dashboard.opts.layout[1].val = 8 return dashboard end, config = function(_, dashboard) -- close Lazy and re-open when the dashboard is ready if vim.o.filetype == "lazy" then vim.cmd.close() vim.api.nvim_create_autocmd("User", { pattern = "AlphaReady", callback = function() require("lazy").show() end, }) end require("alpha").setup(dashboard.opts) pcall(vim.cmd.AlphaRedraw) end, }
Both hightlight group AlphaHeaderFG and AlphaHeaderBG define using vim.api.nvim_set_hl():
AlphaHeaderFG
AlphaHeaderBG
vim.api.nvim_set_hl()
vim.api.nvim_set_hl(0, "AlphaHeaderFG", { fg = "#ffffff" }) vim.api.nvim_set_hl(0, "AlphaHeaderBG", { bg = "#ffffff" })
What shown (only the AlphaHeaderBG render)
I try changing my header color foreground but it seem that only background work. Config
Both hightlight group
AlphaHeaderFG
andAlphaHeaderBG
define usingvim.api.nvim_set_hl()
:What shown (only the
AlphaHeaderBG
render)