Skip to content

Commit

Permalink
fix(load): add setup guard
Browse files Browse the repository at this point in the history
If the user has not called setup then the cache has not been checked.
This means that there is no checking if the plugin has updated.
  • Loading branch information
EdenEast committed Mar 23, 2023
1 parent 3802464 commit 9b6e3a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/nightfox/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ function M.load(opts)
return
end

if not did_setup then
M.setup()
end

opts = opts or {}

local _, compiled_file = config.get_compiled_info(opts)
Expand All @@ -63,7 +67,9 @@ function M.load(opts)
lock = false
end

local did_setup = false
function M.setup(opts)
did_setup = true
opts = opts or {}

local override = require("nightfox.override")
Expand Down

0 comments on commit 9b6e3a4

Please sign in to comment.