goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.73k stars 101 forks source link

About redraw part of the content #284

Closed jinzhongjia closed 1 month ago

jinzhongjia commented 1 month ago

How to redraw part of the content?

I have a ~/code path that stores projects I often develop, but there may be too many folders in it, which will make it impossible to display them all on alpha (the height of the buffer will exceed the height of the split window), so I want to implement a page turning function image

goolord commented 1 month ago

example from the startify theme's mru section: https://github.com/goolord/alpha-nvim/blob/41283fb402713fc8b327e60907f74e46166f4cfd/lua/alpha/themes/startify.lua#L232-L242

atm there's no way to redraw just one section, you just call alpha.redraw whenever you want to redraw any part of the screen. for your purpose calling vim.cmd('AlphaRemap') would also be necessary

jinzhongjia commented 1 month ago

Can I modify the config directly through setup?

goolord commented 1 month ago

yes, if there is any existing setup function you should call it in the body of the new function like so

setup = function ()
  config.setup()
  launchNukes()
end