diff --git a/.config/nvim/lua/once.lua b/.config/nvim/lua/once.lua deleted file mode 100644 index a3979b24..00000000 --- a/.config/nvim/lua/once.lua +++ /dev/null @@ -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