Skip to content

Image rendering in nvim dashboard #24

Answered by 3rd
copeugne asked this question in Q&A
Discussion options

You must be logged in to vote

@copeugne You'll want to do something like this: https://github.com/3rd/config/blob/master/home/dotfiles/nvim/lua/modules/alpha.lua

It's not perfect, something happens inside alpha that clears the virtual space the plugin injects.
This happend when the window is resized and probably in many other cases.
A workaround would be to disable the virtual text, set a fixed height on the image, and just inject padding from alpha.
Another would be to hook into whatever alpha is doing and call image:render() again after it's done.

Rendering the image might slow down your startup, depending on your computer but also on the image size.
Here's a small demo:

alpha.mp4

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@copeugne
Comment options

Comment options

You must be logged in to vote
3 replies
@copeugne
Comment options

@copeugne
Comment options

@3rd
Comment options

Answer selected by 3rd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants