Skip to content

Commit

Permalink
Merge configuration inside harpoon.setup()
Browse files Browse the repository at this point in the history
  • Loading branch information
metalinspired committed Nov 1, 2024
1 parent 43be3f6 commit 46b6b9d
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,8 +144,10 @@ 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)
self.ui:configure(self.config.settings)
self._extensions:emit(Extensions.event_names.SETUP_CALLED, self.config)
sync_on_change(the_harpoon)

---TODO: should we go through every seen list and update its config?

Expand Down

0 comments on commit 46b6b9d

Please sign in to comment.