dashboard-nvim icon indicating copy to clipboard operation
dashboard-nvim copied to clipboard

Async element load for part that will be update later

Open vTuanpham opened this issue 1 year ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe. I'm making a dashboard that will call an LLM to generate some random fact every time i open up nvim, but there doesn't seem to be a way to add a callback for later update. Since waiting for the LLM to response will take about 3-4 seconds and the whole dashboard will be block from loading.

Describe the solution you'd like An example implementation or an expose api of some kind to update the dashboard asynchronously like logo, footer,...

Additional context Dashboard with random fact: image

Dashboard while loading: image

I try to inject asynchronously into the buffer using vim.api.nvim_buf_set_lines but it doesn't follow the theme of the dashboard and the actual fact will disappear for any changes of the window size. image

Any suggestion appreciated since i'm still new as this and wonder if this is even possible.

vTuanpham avatar Oct 17 '24 15:10 vTuanpham