feat(image): add icns support (#2120)

## Description

Add support for icns using sips

## Screenshots

<img width="708" height="910" alt="image"
src="https://github.com/user-attachments/assets/9ca85b23-e020-4b05-9aeb-6d40666d71b6"
/>

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
Sassan Haradji 2025-10-21 10:07:14 +03:30 committed by GitHub
parent 3d8fd67d22
commit 9df47bce6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 0 deletions

View file

@ -47,6 +47,15 @@ local uv = vim.uv or vim.loop
---@type table<string, snacks.image.cmd>
local commands = {
icns = {
ft = "png",
cmd = {
{
cmd = "sips",
args = { "-s", "format", "png", "{src}", "--out", "{file}" },
},
},
},
url = {
cmd = {
{

View file

@ -64,6 +64,7 @@ local defaults = {
"mkv",
"webm",
"pdf",
"icns",
},
force = false, -- try displaying the image, even if the terminal does not support it
doc = {

View file

@ -38,6 +38,7 @@ local config = {
"mkv",
"webm",
"pdf",
"icns",
},
},
}