From 0229956ba853b94206881c23dd590e525979e1bc Mon Sep 17 00:00:00 2001 From: rajvatsal Date: Sun, 7 Jan 2024 11:50:23 +0530 Subject: [PATCH] fix(alpha-hl): Fix highlighting for alpha elements Lazy loading fortunes plugin fixes the highlighting in alpha elements like header, footer etc. Highlighting is only fixed for pre-defined highlight_groups --- lua/custom/plugins/alpha.lua | 4 ++-- lua/custom/plugins/fortunes.lua | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/fortunes.lua diff --git a/lua/custom/plugins/alpha.lua b/lua/custom/plugins/alpha.lua index 99e30e25..7e3e935c 100644 --- a/lua/custom/plugins/alpha.lua +++ b/lua/custom/plugins/alpha.lua @@ -1,6 +1,6 @@ return { 'goolord/alpha-nvim', - dependencies = { 'nvim-tree/nvim-web-devicons', 'BlakeJC94/alpha-nvim-fortune' }, + dependencies = { 'nvim-tree/nvim-web-devicons' }, -- removing fortune from dependencies fixed the highlighting(only for predefined highlights) config = function() local alpha = require("alpha") local dashboard = require("alpha.themes.dashboard") @@ -313,7 +313,7 @@ return { --[[local handle = assert(io.popen('fortune -s')) local fortune = handle:read("*all") handle:close()]] - dashboard.section.footer.val = getFortune() -- require(alpha.fortune)() + dashboard.section.footer.val = getFortune() -- ('alpha.fortune')() dashboard.section.header.opts.hl = "Error" dashboard.section.buttons.opts.hl = "Debug" dashboard.section.footer.opts.hl = "Conceal" diff --git a/lua/custom/plugins/fortunes.lua b/lua/custom/plugins/fortunes.lua new file mode 100644 index 00000000..ef957ecd --- /dev/null +++ b/lua/custom/plugins/fortunes.lua @@ -0,0 +1 @@ +return { 'BlakeJC94/alpha-nvim-fortune', lazy = true }