Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async element load for part that will be update later #492

Open
vTuanpham opened this issue Oct 17, 2024 · 0 comments
Open

Async element load for part that will be update later #492

vTuanpham opened this issue Oct 17, 2024 · 0 comments

Comments

@vTuanpham
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant