From 509e8720264426c6b18c0e21ca67aaaee0d2e5bc Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Thu, 16 May 2024 22:32:42 +0200 Subject: [PATCH] perf: replace `vim.g` with `_G` in init check --- plugin/rocks.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/rocks.lua b/plugin/rocks.lua index 3a29b2bf..9551f490 100644 --- a/plugin/rocks.lua +++ b/plugin/rocks.lua @@ -6,7 +6,7 @@ -- Homepage: https://github.com/nvim-neorocks/rocks.nvim -- Maintainers: NTBBloodbath , Vhyrro , mrcjkb -if vim.g.rocks_nvim_loaded then +if _G.rocks_nvim_loaded then return end @@ -58,4 +58,4 @@ local user_rocks = config.get_user_rocks() require("rocks.api.hooks").run_preload_hooks(user_rocks) require("rocks.runtime").source_start_plugins(user_rocks) -vim.g.rocks_nvim_loaded = true +_G.rocks_nvim_loaded = true