Skip to content

Commit

Permalink
fix ThePrimeagen#565: setup data after config loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
rndev-io committed Apr 11, 2024
1 parent 0378a6c commit b8cc0e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/harpoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@ function Harpoon:new()

local harpoon = setmetatable({
config = config,
data = Data.Data:new(config),
logger = Log,
ui = Ui:new(config.settings),
_extensions = Extensions.extensions,
lists = {},
hooks_setup = false,
}, self)
sync_on_change(harpoon)

return harpoon
end
Expand Down Expand Up @@ -146,6 +144,8 @@ function Harpoon.setup(self, partial_config)

---@diagnostic disable-next-line: param-type-mismatch
self.config = Config.merge_config(partial_config, self.config)
self.data = Data.Data:new(self.config)
sync_on_change(self)
self.ui:configure(self.config.settings)
self._extensions:emit(Extensions.event_names.SETUP_CALLED, self.config)

Expand Down

0 comments on commit b8cc0e0

Please sign in to comment.