Closed yamatsum closed 2 years ago
What exactly do you mean with global statusline support?
Neovim's global statusline and this plugin are orthogonal. This plugin already provides a global statusline, it lives in the tmux statusline. What in particular do you envision when you mean supporting global statusline?
in plugin.lua
vim.g.tpipeline_autoembed = 0
tmux.conf
set -g status-left '#(cat #{socket_path}-\#{session_id}-vimbridge)'
set -g status-left-length 90
set -g status-right "#(cat #{socket_path}-\#{session_id}-vimbridge-R) #[fg=#6a737d]#{?client_prefix,#[fg=#316DCA],}□"
set -g status-right-length 90
In the case of the above settings, tmux statusline will be as follows.
But to the right of the real vim statuline is showing git branch information
Maybe the global status line doesn't matter. statsline on the nvim side is set using lualine.
require("lualine").setup({
options = {
globalstatus = true,
},
sections = {
lualine_a = {
{
"mode",
},
},
lualine_b = {
{
"filename",
},
},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {
{
"branch",
},
},
},
})
I tried your config, but I cannot reproduce unfortunately, it works for me:
What version of neovim are you using? Can you perhaps provide more detailed steps on how to reproduce this? Maybe I need your entire vim config to reproduce this.
Oh I forgot to use your manual embed step, I can reproduce now. In your set -g status-right
command you are using double quotes "
, but you need to use single quotes '
like the documentation says, or alternatively escape problematic characters.
-set -g status-right "#(cat #{socket_path}-\#{session_id}-vimbridge-R) #[fg=#6a737d]#{?client_prefix,#[fg=#316DCA],}□"
+set -g status-right '#(cat #{socket_path}-\#{session_id}-vimbridge-R) #[fg=#6a737d]#{?client_prefix,#[fg=#316DCA],}□'
So the issue has nothing to do with global statusline, you are just missing the entire right part of the statusline due to using a misconfigured status-right
.
It was my mistake! Thank you!
On a related note, I don't understand why all these statuslines like lualine add their own globalstatus
option, when they can just use the official laststatus = 3
option. When you go look at the PR that supposedly implements "global statusline" support for lualine and take a look at the code, then you will see that all it does is set laststatus
to 3
if globalstatus
is true, which is ridiculous, since the user could just directly set laststatus
.
https://github.com/neovim/neovim/issues/9342