-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Multiple status bars will show wrong title when navigating between windows #26
Comments
i see this happens due to a function ( which prints current active buffer name ) |
i removed that commit as it was showing same file icons on multiple statusbars. If you are fine without fileicon then you can try this ["NvChad/ui"] = {
override_options = {
statusline = {
overriden_modules = function()
return {
fileInfo = function()
local filename = (vim.fn.expand "%" == "" and " Empty") or " %t "
return "%#St_file_info#" .. filename .. "%#St_file_sep#" .. " "
end,
}
end,
},
},
}
|
@siduck Thank you for looking into this. It's unfortunate that I lose the icon in the process, but it's actually more worth to have a proper status bar for each window than having an icon, so I really appreciate your solution, it works like charm! =) Good job! |
@martin-braun there might be a way to get the icon too i think! Can you try any statusline plugin and with laststatus=2 and see if they have working icons on multiple bars?
|
@siduck lualine seems to show their icon (and a lot of other information) only from the active buffer on the current window. |
The code snippet provided in #26 (comment) is out of date. 😥 I had to update it, per nvchad_ui v2.0 documentation, as follows: M.ui = {
-- https://github.com/NvChad/NvChad/discussions/2233
-- https://github.com/NvChad/ui/issues/26#issuecomment-1312632083
-- https://nvchad.com/docs/config/nvchad_ui#override_statusline_modules
statusline = {
overriden_modules = function(modules)
modules[2] = (function()
local filename = (vim.fn.expand "%" == "" and " Empty") or " %t "
return "%#St_file_info#" .. filename .. "%#St_file_sep#" .. " "
end)()
end,
},
} |
Putting
vim.opt.laststatus = 2
to have window based status bars (instead of a global one) reveals an issue when navigating between the windows:2022-10-09.12.01.59.AM.mp4
Both window status bars display the same file name / title.
The text was updated successfully, but these errors were encountered: