nvim: remove `once' helper

This commit is contained in:
Primrose 2025-08-09 09:01:14 +02:00
parent c8e4bcc675
commit 547ae11f4d
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -1,15 +0,0 @@
-- A helper that prevents something to be loaded more than once
M = {}
---@param label string
---@param callback function
function M.test_and_load(label, callback)
local once = vim.g.once or {}
if not once[label] then
callback()
once[label] = true
vim.g.once = once
end
end
return M