Closed alezunino closed 2 years ago
Unfortunately, can not reproduce it. Neither with minimal setup, nor with my full one.
What I see in the "After" picture is an "inactive" statusline (displays full path by default). It also seems that you set up to use global statusline with laststatus = 3
along with some kind of plugin to make thin line separator instead of one with one cell height. I'd guess that somehow laststatus
is set to 2 and that thin line hides the actual active statusline at that window.
Hi, Yes, in these screenshots, laststatus = 3 and the line separator is a result of this option. I have made the statusline appear again by doing :bnext or :bprevious one. However, it disappears again after changing to a different split. I have also tried with laststatus = 2 with the same result.
This is my config: https://github.com/alezunino/dotfiles/tree/master/nvim
I have tried removing most of the plugins except telescope/lsp/cmp with no success. Do you think some of the other plugins might be interfering with mini.statusline?
thanks for this amazing plugin!!!
Yes, in these screenshots, laststatus = 3 and the line separator is a result of this option. I have made the statusline appear again by doing :bnext or :bprevious one. However, it disappears again after changing to a different split. I have also tried with laststatus = 2 with the same result.
This is my config: https://github.com/alezunino/dotfiles/tree/master/nvim
Without screenshots or video this will be harder to investigate. And link says "Page is not found" (seems like this is a private repo).
Does full info appear in the same place where previously there was only file path? Are you sure laststatus
is set to what you expect it to be (can check with :echo &laststatus
).?
It definitely seems like some other plugin or you configuration doing something unexpected. Here is what it looks like with only 'mini.statusline' loaded and vim.o.laststatus = 3
(video displays file with the whole config):
By the way, here you can also see that line separator has a full cell height with laststatus = 3
.
Yes, full info appear in the same place where previously there was only file path. I have checked laststatus and its value does not change. I will try removing most of my plugins with no success so far.
The screenshots bellow are taken with laststatus = 2.
Here the statusline is ok:
This is after moving to the upper split (statusline shows as inactive):
This is after executing :bnext. The statusline is ok
These are my nvim config files: nvimrc.zip
Well, that was fun. My debugging journey:
vim.cmd [[autocmd BufWinEnter,WinEnter * if &buftype == 'terminal' | silent! normal i | endif]]
. Again, good old "comment half and see if problem persists". This narrowed it down to this line: if commented, problem was gone. So this finally lead me to a minimal reproducible 'init.lua':
vim.cmd('packadd mini.nvim')
vim.cmd [[autocmd BufWinEnter,WinEnter * if &buftype == 'terminal' | silent! normal i | endif]]
require('mini.statusline').setup()
Interestingly, if require('mini.statusline').setup()
is put before that troublesome line or only BufWinEnter
is used, everything works. So something is happening in that command that prevents autocommand from MiniStatusline
to kick in and set active statusline. This checks out with observation that this only happens with same buffer (because BufEnter
autocommand is not fired in this case, only WinEnter
).
normal i
is followed by | endif
. From :h normal
: This command cannot be followed by another command, since any '|' is considered part of the command.
So minimal tweak can be replacing inner block with execute 'silent! normal i'
. And indeed it works now. What I would really recommend is replacing this with a more suitable autocmd TermOpen * startinsert
.Thanks for an interesting use case! Closing this as the problem is not in plugin.
Contributing guidelines
Module(s)
mini.statusline
Description
The statusline disappear when I create a split and move to it. This happens regardless the split type (horizontal or vertical). Even when closing the split the statusline does not appear.
Neovim version
0.7.0
Steps to reproduce
Expected behavior
The statusline should remain visible
Actual behavior
This is a screenshot just before moving to a split, where the statusline is ok:
This is a screenshot after moving to the split, where the the statusline has disappeared: