feat(hologram.lua): add support for hologram plugin to display and handle image previews in Neovim

This commit adds two new files: `hologram.lua` and `hologram.lua`.

The `hologram.lua` file contains the configuration for the `hologram.nvim` plugin. It is responsible for setting up the plugin and linking it to the `absolute.after.hologram` file.

The `hologram.lua` file contains the implementation for handling image previews using the `hologram` and `image` modules. It sets up autocmds to trigger the `handle_image_preview` function when entering or opening a buffer with an image file. The function creates a new image object and displays it for 5 seconds before deleting it. There is also a `handle_image_preview_close` function that is triggered when leaving or closing a buffer with an image file, but it is currently commented out.

These changes were made to enhance the functionality of Neovim by allowing users to preview images within the editor using the `hologram.nvim` plugin.
This commit is contained in:
David Ibia
2024-02-08 22:51:47 +01:00
parent bce7208644
commit a0d0658a16
2 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
return {
"edluffy/hologram.nvim",
config = function()
require("absolute.after.hologram")
end,
}