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
This commit is contained in:
		
							parent
							
								
									781ed08574
								
							
						
					
					
						commit
						0229956ba8
					
				| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
return {
 | 
					return {
 | 
				
			||||||
  'goolord/alpha-nvim',
 | 
					  '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()
 | 
					  config = function()
 | 
				
			||||||
    local alpha = require("alpha")
 | 
					    local alpha = require("alpha")
 | 
				
			||||||
    local dashboard = require("alpha.themes.dashboard")
 | 
					    local dashboard = require("alpha.themes.dashboard")
 | 
				
			||||||
| 
						 | 
					@ -313,7 +313,7 @@ return {
 | 
				
			||||||
    --[[local handle = assert(io.popen('fortune -s'))
 | 
					    --[[local handle = assert(io.popen('fortune -s'))
 | 
				
			||||||
    local fortune = handle:read("*all")
 | 
					    local fortune = handle:read("*all")
 | 
				
			||||||
    handle:close()]]
 | 
					    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.header.opts.hl = "Error"
 | 
				
			||||||
    dashboard.section.buttons.opts.hl = "Debug"
 | 
					    dashboard.section.buttons.opts.hl = "Debug"
 | 
				
			||||||
    dashboard.section.footer.opts.hl = "Conceal"
 | 
					    dashboard.section.footer.opts.hl = "Conceal"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					return { 'BlakeJC94/alpha-nvim-fortune', lazy = true }
 | 
				
			||||||
		Loading…
	
		Reference in New Issue