Skip to content

Commit

Permalink
fix: run python and go setups in the VimEnter autocmd
Browse files Browse the repository at this point in the history
This will prevent of important variables not be present during the
setup execution.

Fixes: #4
  • Loading branch information
piraz committed Aug 19, 2024
1 parent f11a631 commit d4782b1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lua/chase/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
})
Expand Down

0 comments on commit d4782b1

Please sign in to comment.