From 547ae11f4d247d1af02f9a5fb2fde855db36a409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 9 Aug 2025 09:01:14 +0200 Subject: [PATCH] nvim: remove `once' helper --- .config/nvim/lua/once.lua | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .config/nvim/lua/once.lua 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