Closed vurentjie closed 3 months ago
I noticed when each window has it's own statusline then the images overlap the statusline.
Repro steps:
image-test.lua
nvim --clean -u image-test.lua
:new
:edit /path/to/image.png
Screencast demo: Screencast 2024-06-14 10:10:42.webm
Lua code:
--save this as image-test.lua local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.uv.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath, }) end vim.opt.rtp:prepend(lazypath) local lazy = require("lazy") --[[@as Lazy]] vim.api.nvim_set_hl(0, "TabLine", { fg = "#ffffff", bg = "#770000" }) vim.api.nvim_set_hl(0, "StatusLine", { fg = "#ffffff", bg = "#777700" }) vim.api.nvim_set_hl(0, "StatusLineNC", { fg = "#ffffff", bg = "#777700" }) vim.api.nvim_set_hl(0, "Winbar", { fg = "#ffffff", bg = "#000077" }) vim.api.nvim_set_hl(0, "WinbarNC", { fg = "#ffffff", bg = "#000077" }) vim.opt.mouse = 'a' vim.opt.showtabline = 2 vim.opt.laststatus = 2 vim.opt.tabline = "Tabline text goes here" vim.opt.statusline = "Statusline text goes here" vim.opt.winbar = "Winbar text goes here" lazy.setup({ { "vhyrro/luarocks.nvim", priority = 1001, opts = { rocks = { "magick" }, }, }, { "3rd/image.nvim", dependencies = { "luarocks.nvim" }, config = function() require('image').setup({ backend = 'kitty', max_width_window_percentage = 1000, max_height_window_percentage = 1000, }) end, }, }, {})
Placeholder image used in demo (600x400 pixels):
I was able to fix my issue with these changes, https://github.com/3rd/image.nvim/compare/master...vurentjie:image.nvim:master
Hey, that's awesome, would you like to open a PR to track your contribution?
I noticed when each window has it's own statusline then the images overlap the statusline.
Repro steps:
image-test.lua
nvim --clean -u image-test.lua
:new
:edit /path/to/image.png
Screencast demo: Screencast 2024-06-14 10:10:42.webm
Lua code:
Placeholder image used in demo (600x400 pixels):