mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
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:
parent
3d8fd67d22
commit
9df47bce6a
3 changed files with 11 additions and 0 deletions
|
|
@ -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 = {
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ local config = {
|
|||
"mkv",
|
||||
"webm",
|
||||
"pdf",
|
||||
"icns",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue