From d4782b1eaa4a69d948863184334a75d6f72e621b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 19 Aug 2024 17:38:00 -0400 Subject: [PATCH] fix: run python and go setups in the VimEnter autocmd This will prevent of important variables not be present during the setup execution. Fixes: #4 --- lua/chase/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/chase/init.lua b/lua/chase/init.lua index 4177a24..0652a19 100644 --- a/lua/chase/init.lua +++ b/lua/chase/init.lua @@ -325,12 +325,6 @@ function M.setup(config) if file == nil then return end - if M.config.python.enabled then - require("chase.python").setup() - end - if M.config.go.enabled then - require("chase.go").setup() - end local config = vim.json.decode(file:read()) file:close() end @@ -433,6 +427,12 @@ vim.api.nvim_create_autocmd("VimEnter", { callback = function () M.vim_did_enter = true M.setup_virtualenv("chase_global", M.set_python_global) + if M.config.python.enabled then + require("chase.python").setup() + end + if M.config.go.enabled then + require("chase.go").setup() + end end, group = M.group, })