Closed anurag3301 closed 9 months ago
You can change the default_color if you didn't specify the highlight.
highlight = "", default_color = "#FFFFFF"
Thanks but highlight = ""
didnt work,
I had to enter a random string like highlight = "Header"
, I dont know about the internal details, you can tell me why.
Hi,
May be a long time, but I ran into your specific issue.
highlight
refers to the nvim highlight group that will be used to display your section. By using :hi
, you can see what groups are available, and :hi <groupname>
would tell you what it corresponds to. On my config, :hi String
returns String xxx guifg=#c3e88d
, meaning it uses a color as close to #c3e88d
as possible.
I wanted to have my section in a bold blue color so I ended up with something like:
vim.api.nvim_set_hl(0, 'MySectionColorGroup', { fg = "#4493f8", bold = true })
local settings = {
header = {
type = "text",
oldfiles_directory = false,
align = "center",
fold_section = false,
title = "Header",
margin = 5,
content = "whatever",
highlight = "MySectionColorGroup", -- <== Right here, the highlightgroup we just created.
default_color = "",
oldfiles_amount = 0,
},
-- ...
I think it just so happened on your config that Header
was a background-less white text (which you can check using :hi Header
).
Hey I recently switched from
nvim-dashbaord
tostartup.nvim
, I took the copy of lua/startup/themes/dashboard.lua and I want to change the colours of the sections.I want the top unicode image in white color and the key binds in the middle in blue. I tried doing some things but didnt work, can you help me with this.
My current config