diff --git a/docs/image.md b/docs/image.md index bd5ee3ce7..0aef44c8f 100644 --- a/docs/image.md +++ b/docs/image.md @@ -18,6 +18,7 @@ Terminal support: - [wezterm](https://wezfurlong.org/wezterm/) Wezterm has only limited support for the kitty graphics protocol. Inline image rendering is not supported. +- [warp](https://www.warp.dev/) - [tmux](https://github.com/tmux/tmux) Snacks automatically tries to enable `allow-passthrough=on` for tmux, but you may need to enable it manually in your tmux configuration. diff --git a/lua/snacks/image/init.lua b/lua/snacks/image/init.lua index 038016e1c..f52a27e22 100644 --- a/lua/snacks/image/init.lua +++ b/lua/snacks/image/init.lua @@ -18,7 +18,7 @@ local M = setmetatable({}, { }) M.meta = { - desc = "Image viewer using Kitty Graphics Protocol, supported by `kitty`, `wezterm` and `ghostty`", + desc = "Image viewer using Kitty Graphics Protocol, supported by `kitty`, `wezterm`, `ghostty` and `warp`", needs_setup = true, } @@ -308,7 +308,7 @@ function M.health() vim.wait(1500, function() return detected end, 10) - Snacks.health.have_tool({ "kitty", "wezterm", "ghostty" }) + Snacks.health.have_tool({ "kitty", "wezterm", "ghostty", "warp" }) local is_win = jit.os:find("Windows") if not Snacks.health.have_tool({ "magick", not is_win and "convert" or nil }) then Snacks.health.error("`magick` is required to convert images. Only PNG files will be displayed.") @@ -374,7 +374,7 @@ function M.health() Snacks.health.warn("image viewer is enabled with `opts.force = true`. Use at your own risk") else Snacks.health.error("your terminal does not support the kitty graphics protocol") - Snacks.health.info("supported terminals: `kitty`, `wezterm`, `ghostty`") + Snacks.health.info("supported terminals: `kitty`, `wezterm`, `ghostty`, `warp`") end end diff --git a/lua/snacks/image/terminal.lua b/lua/snacks/image/terminal.lua index 0a42c49ed..bec9deb19 100644 --- a/lua/snacks/image/terminal.lua +++ b/lua/snacks/image/terminal.lua @@ -23,6 +23,12 @@ local environments = { supported = true, placeholders = false, }, + { + name = "warp", + env = { TERM_PROGRAM = "WarpTerminal" }, + supported = true, + placeholders = false, + }, { name = "tmux", env = { TERM = "tmux", TMUX = true },