galaxyline.nvim
galaxyline.nvim copied to clipboard
Icon has weird behaviour sometimes
My line usually looks like this:
but sometimes something makes the git icon move too far to the left:
Code for the affected section:
gls.left[1] = {
ViMode = {
provider = function()
vim.api.nvim_command('hi GalaxyViMode guifg=' .. mode_color[vim.fn.mode()])
return '▊ '
end,
highlight = {colors.red, colors.line_color}
}
}
gls.left[2] = {
GitIcon = {
condition = condition.check_git_workspace,
provider = function()
return ' '
end,
highlight = {colors.blue, colors.line_color}
}
}
I think this is due to the separators in diagnostics section. Since they are always ON (just it does not show if count is zero), so the separators may push other icons.
I fixed it using some hack. Here is the link to my config.