vim.ui.img._kitty
Kitty graphics protocol implementation for vim.ui.img.
Methods4
function M.set(data: string, opts: vim.ui.img.Opts) -> (img_id integer, placement_id integer)
Transmit image bytes and place the image. Returns both IDs.
Parameters
datastringraw image bytes
optsvim.ui.img.Opts
Returns
img_idintegerplacement_idinteger
function M.update(img_id: integer, placement_id: integer, opts: vim.ui.img.Opts) -> nil
Update an existing placement (flicker-free, reuses same IDs).
function M.delete(img_id: integer) -> nil
Delete an image and all its placements from the terminal. When {img_id} is math.huge, deletes all images.
function M.supported(opts: { chan: integer?, timeout: integer? } | nil) -> (supported boolean, msg nil | string)
Query whether this terminal supports the kitty graphics protocol. Blocks until the terminal responds or times out.
Parameters
opts{ chan: integer?, timeout: integer? } | niltimeout in milliseconds (default: 1000)
Returns
supportedbooleanmsgnil | stringerror detail if terminal responded but not with OK