smelt.buf¶
Tier: UiHost - Requires a terminal UI; calling these from headless mode raises.
Visibility: Public - Stable Lua API intended for user config and plugins.
Buffer handle constructor. smelt.buf.new(opts?) returns a Buf userdata. opts.name opts the buffer into hot-reload survival - repeat calls with the same name return the same handle with mutable opts re-applied. Anonymous buffers are reaped on /reload. UiHost-only - buffers are terminal-screen backing stores that windows render into.
smelt.buf.new¶
Types: smelt.buf.NewOpts, smelt.buf.Buf
Create a buffer and return a Buf userdata. opts.name opts the buffer into hot-reload survival. Repeat calls with the same name return the same handle with mutable opts re-applied. When omitted from a module body, a stable per-(plugin, declaration-index) name is auto-assigned so the buffer survives /reload without explicit naming.