Skip to content

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

@vTuanpham

Description

@vTuanpham

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions