fix: prevent `setup` function to be called twice
parent
805b41ed58
commit
3864d3b9b9
|
|
@ -1,5 +1,6 @@
|
||||||
local deps = require 'sloth-flake.deps'
|
local deps = require 'sloth-flake.deps'
|
||||||
local priv = {
|
local priv = {
|
||||||
|
setup_called = false,
|
||||||
is = {
|
is = {
|
||||||
init = {},
|
init = {},
|
||||||
import = {},
|
import = {},
|
||||||
|
|
@ -182,6 +183,11 @@ function unshim_plugin(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.setup(config)
|
function M.setup(config)
|
||||||
|
if priv.setup_called then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
priv.setup_called = true
|
||||||
|
|
||||||
local post_init = config and config.post_init or function() end
|
local post_init = config and config.post_init or function() end
|
||||||
|
|
||||||
M.init_non_lazy()
|
M.init_non_lazy()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue