Bekaboo / dropbar.nvim

IDE-like breadcrumbs, out of the box
GNU General Public License v3.0
990 stars 23 forks source link

fix(setup): avoid setup twice when using lazy.nvim #181

Closed phanen closed 1 week ago

phanen commented 3 weeks ago

setup is execute twice when using lazy.nvim load this plugin with opts = {...}.

~This is also a workaround for https://github.com/Bekaboo/dropbar.nvim/issues/141.~

Bekaboo commented 3 weeks ago

Why is this a problem?

phanen commented 3 weeks ago

Previously thought: we don't need the lazy-load behavior here in plugin/dropbar.lua, when user can use their own lazy.nvim spec to issue autocmd.

But I just realized there's no problem with twice setup, since the second one clear the previous augroup and only merge in new opts. So setup is designed to be able to execute whatever times.

So feel free to close this.

Bekaboo commented 1 week ago

Hi, sorry for the delay. Could you correct the format so that I can merge this PR? More specifically, breaking the if statement into multiple lines should be sufficient.

phanen commented 1 week ago

Fixed.