fix: add missing cast for opts in render_buffer_async

Problem: LuaLS still warns at opts.refetch access because it does not
track narrowing through opts = opts or {}.

Solution: add ---@cast opts -nil after the guard, matching the same
pattern used in util.render_text.
This commit is contained in:
Barrett Ruth 2026-02-20 20:49:18 -05:00
parent 60aed7d595
commit 6dcd9c0d8f
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -912,6 +912,7 @@ local pending_renders = {}
---@param caller_callback nil|fun(err: nil|string)
M.render_buffer_async = function(bufnr, opts, caller_callback)
opts = opts or {}
---@cast opts -nil
local function callback(err)
if not err then
vim.api.nvim_exec_autocmds(