-
Notifications
You must be signed in to change notification settings - Fork 67
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: Zen mode is closed upon toggling the terminal #398
Comments
That is intended behavior as the code here indicates. Whenever you enter another window such as a terminal and it's not a floating window then zen mode exits. |
I see. I can see how this would be helpful in some contexts like opening nvim-tree; but in this case isn't there a way to get around this behavior? In my workflow I tend to open and close the terminal a lot and so having to turn on zen mode every single time pretty much defeats the whole purpose of it. |
Just open your terminal as a float window instead, since that doesn't seem to quit zen mode? |
Yes I ended up doing that thanks for the suggestion. For anyone wondering how to do it, your snacks config should look something like this: opts = {
terminal = {
---@class snacks.terminal.Config
---@field win? snacks.win.Config
---@field override? fun(cmd?: string|string[], opts?: snacks.terminal.Opts) Use this to use a different terminal implementation
win = { position = "float" },
},
} |
By doing it this way, you're changing the behavior for all terminal windows that are created with Snacks. This might be the behavior you want or might not. For example lazygit also opens in a terminal window but it's opened in a float window either way by default. Personally I prefer to put these custom changes into opts = {
styles = {
terminal = {
position = "float",
},
}
} |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM 0.10.2
Operating system/version
Arch linux kernel 6.12.4-zen1-1-zen
Describe the bug
opening the snacks terminal closes the zen mode.
demonstration
out.mp4
Steps To Reproduce
Expected Behavior
snacks terminal does nothing to zen mode and it is kept open.
Repro
The text was updated successfully, but these errors were encountered: