ci: format

This commit is contained in:
Barrett Ruth 2026-03-01 17:22:59 -05:00
commit e49a664d48
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
30 changed files with 1612 additions and 0 deletions

35
lua/render/log.lua Normal file
View file

@ -0,0 +1,35 @@
local M = {}
local enabled = false
local log_file = nil
---@param val boolean|string
function M.set_enabled(val)
if type(val) == 'string' then
enabled = true
log_file = val
else
enabled = val
log_file = nil
end
end
---@param msg string
---@param ... any
function M.dbg(msg, ...)
if not enabled then
return
end
local formatted = '[render.nvim]: ' .. string.format(msg, ...)
if log_file then
local f = io.open(log_file, 'a')
if f then
f:write(string.format('%.6fs', vim.uv.hrtime() / 1e9) .. ' ' .. formatted .. '\n')
f:close()
end
else
vim.notify(formatted, vim.log.levels.DEBUG)
end
end
return M