-
Would it be possible to use this plugin to render an image in the header of an nvim dashboard instead of an ascii art or braille representation of an image ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Yes, definitely! |
Beta Was this translation helpful? Give feedback.
-
@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. Rendering the image might slow down your startup, depending on your computer but also on the image size. alpha.mp4 |
Beta Was this translation helpful? Give feedback.
@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