-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug v3: preview with main window should open folds #408
Comments
Ah, it seems it comes from here: trouble.nvim/lua/trouble/view/window.lua Lines 148 to 153 in 10eff94
I believe, if |
Both issue should be fixed now. In Trouble v2, the actual main window was used to show the preview buffer, but this could lead to all sorts of weird issues. In v3, I indeed create a fake floating window on top of the main window. |
Thanks! It's more or less fixed now - although one thing is still missing (for me). Both the preview, and the navigation with I would not mind if this is configurable and "default off", although I would argue that, at least for previewing, opening folds seems like the expected behaviour. |
I think, for the |
I just pushed a fix for opening folds after jumping (preview was already fixed). |
Yes, it seems to work very well and perfectly to my preference; thanks! Would it be possible to have this type of behaviour also for the preview feature? |
It should already do that for preview. |
Huh, ok. It seems you are right. Sorry. The preview does not have any closed folds. The reason I was confused is this:
I can see why we might want
|
To get this exact behavior, you can just toggle auto preview with |
Well, yes, that's almost right. I don't really like the auto preview. But fair enough, let's leave it at that. If it becomes too much of an itch I can try and make my own |
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0-dev-2754+g12240600f5
Operating system/version
Arch Linux
Describe the bug
When I open e.g. the symbols or lsp mode in a file where I have folds, the preview will not open/adjust the folds. I believe this can be fixed by including the window option
foldenable = false
somewhere, but I'm not exactly sure where.Notice, I can fix this locally through configuration with
An additional question: I notice that the entire background of the main view is changed on the preview. Do I understand correctly that this is because the
main
type of the window is really a floating window in disguise? I tried changing it with thewinhighlight
option in thewo
table, but it seems this is always reset?Steps To Reproduce
-- vim: fdm=marker
as a modeline) and add some folds with-- {{{1
.:Trouble lsp focus=true
Expected Behavior
I believe the expected behaviour would be to adjust folds e.g. with the
zv
mapping. Or possibly just disable folds for the preview itself.Repro
No response
The text was updated successfully, but these errors were encountered: