style(hologram.lua): fix indentation for consistency and readability

feat(hologram.lua): change image_pattern to start with a dot for file extensions
feat(hologram.lua): add support for handling image previews on buffer enter and leave events
This commit is contained in:
David Ibia
2024-02-26 14:37:14 +01:00
parent ba39d9bfe4
commit c4e74ff5e1

View File

@@ -44,7 +44,7 @@ local function handle_image_preview_close()
-- new_image = nil
end
local image_pattern = { "*.png", ".jpg", ".jpeg", ".gif" }
local image_pattern = { ".png", ".jpg", ".jpeg", ".gif" }
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = image_pattern,