Bekaboo / dropbar.nvim

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

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

Closed phanen closed 1 month ago

phanen commented 2 months 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 2 months ago

Why is this a problem?

phanen commented 2 months 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 month 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 month ago

Fixed.