trouble.nvim
trouble.nvim copied to clipboard
Close Trouble window
When I use :TroubleClose
or :TroubleToggle
, it closes the window, but then pops back up whenever I pull out of insert mode next time.
Is there a way to just make it go away until I want it back?
were you having auto_open = true
?
Apologies for the delayed reply, I do have that enabled, yes. I think what I want it to do is disable until I re-enable it. I'm pretty sure whatever I had used in the past (Probably ALE + Coc or something) had that functionality, as well as only updating/ checking on save, but that seems to be a built-in lsp thing for neovim that I haven't seen any way of working around yet.
Hmm, @jmiln could you elaborate how that would work? Trouble would automatically open when you have diagnostics but calling :TroubleClose
or :TroubleToggle
would disable that? How would you re-enable it then? Just trying to understand the use case.
Looking back, close makes less sense for what I was thinking of, but it looks like ALE was the one I was remembering having enable/disable/toggle. https://github.com/dense-analysis/ale/blob/a33960eb51b638f232dff71cfeac5ede87b38312/doc/ale.txt#L3679
It's just a bit frustrating when you close it because I don't need it taking up space then it pops back up a few seconds later when you start working again, especially on small split windows
Is there a particular reason why you just don't set auto_open = false
?
Mainly just that I like it popping up and telling me when I do something dumb/ break something, and that's what I'd been used to previously
Would TroubleDisable
and TroubleEnable
commands be enough? I'm not the maintainer but to me this sounds a very niche use case and I'm not sure adding the logic to TroubleToggle
would be worth the added complexity especially in the configuration.
That'd be perfect, actually.
I'd mainly just been hoping there was something already there that I was missing, rather than making more work for anyone.
I'll try to find time to create a PR implementing this sometime next week but given that @folke has been very inactive in this project lately it's probably not gonna be merged any time soon.
Sounds good, thanks for your input on this, hadn't really thought through it previously apparently
I think I'm actually just going to switch to not having it open automatically, and map something to toggle it, since that'll likely be a cleaner workflow in the long run
I agree. This is probably obivous but in case someone else is having
similar workflow hicups: there's plenty of plugins offering visual cues
about available diagnostics in buffers/workspace like bufferline,
lualine, NvimTree to name a few. Having TroubleToggle
bound to some
easy to access keyboard shortcut and opening it when you see you have
diagnostics available but it's not immediately obvious why is IMO a very
smooth workflow. I personally find the auto_open
option noisy.
On October 6, 2022, Peachy74 @.***> wrote:
I think I'm actually just going to switch to not having it open automatically, and map something to toggle it, since that'll likely be a cleaner workflow in the long run
— Reply to this email directly, view it on GitHub <https://github.com/folke/trouble.nvim/issues/193#issuecomment- 1269044244>, or unsubscribe <https://github.com/notifications/unsubscribe- auth/AAVMSNCDQPXLWMGDCHRSMZDWBX5H5ANCNFSM53IYYH3A>. You are receiving this because you commented.Message ID: @.***>