vim.ui.img
Methods3
function M.set(data_or_id: string | integer, opts: vim.ui.img.Opts | nil) -> id integer
Display an image or update an existing one.
When {dataorid} is a string, displays the image bytes at the position given by {opts}. Returns an integer id for later use.
When {dataorid} is an integer (a previously returned id), updates the image with new {opts}.
Parameters
data_or_idstring | integerimage bytes (string) or existing id (integer)
optsvim.ui.img.Opts | nil
Returns
idinteger
function M.get(id: integer) -> opts vim.ui.img.Opts | nil
Get the opts for an image.
Parameters
idinteger
Returns
optsvim.ui.img.Opts | nilcopy of image opts, or nil if not found
function M.del(id: integer) -> found boolean
Delete an image, or all images if math.huge is given as the id.
Parameters
idintegerimage id, or
math.hugeto delete all images
Returns
foundbooleantrue if any image existed