wincent/ferret

Ferret's autocommands clash with other plugins quickfix/loclist display settings

tdooner opened this issue · 3 comments

Hey @wincent, I've got an issue with Ferret clashing with Neomake.

After some digging I've traced it to this autocommand:

autocmd QuickFixCmdPost l* nested lwindow

Without ferret, when I run :Neomake on saving a file, neomake fills the loclist with linter/build output and then looks at some configuration to determine whether to call lwindow and with what argument. This allows users to disable the location list popping up, or to change its height.

Problem being, that ferret autocommand hook for QuickFixCmdPost is calling lwindow unconditionally, so the Neomake configuration settings have no effect.

Happy to attempt a PR for this, but wanted to ping you first to ask:

  • Does it make sense to just run lwindow / cwindow in ferret#private#complete instead?
  • Can the autocommand subscribers be scoped to some more-ferret-specific event names?

Thanks! And thanks for ferret, it's been really useful to me!

Thanks for bringing this up. We should fix it, although I can't give a very good answer right now (on my phone). In general we want to play nicely with other plug-ins by default, and when that's too hard, at least provide an option to override the behavior. Ideally, we don't make any breaking changes to Ferret requiring existing users to adjust their set-ups. Feel free to submit a PR, but if you don't I'll see what I can do about this.

👍 Cool. To my eyes it looks like the plugin/ferret.vim autocommands are superfluous, since the window opens when the finalize_search method calls cwindow.

I'll make a PR to remove them fully realizing that I'm probably overlooking something. :Ack, :Lack, and :Acks seem to work.

Merged your PR to next. Thanks!