fix: disable empty winbar when breadcrumbs are disabled

This commit is contained in:
Ching Pei Yang 2023-12-07 02:31:08 +01:00
parent 99fbf9cad0
commit dd96499826
No known key found for this signature in database
GPG key ID: 062FBBCE1D0C5DD9

View file

@ -4,6 +4,7 @@
... ...
}: let }: let
cfg = config.vim.statusline.lualine; cfg = config.vim.statusline.lualine;
breadcrumbsCfg = config.vim.ui.breadcrumbs;
inherit (lib) mkIf nvim boolToString optionalString; inherit (lib) mkIf nvim boolToString optionalString;
in { in {
config = (mkIf cfg.enable) { config = (mkIf cfg.enable) {
@ -50,7 +51,7 @@ in {
}, },
tabline = {}, tabline = {},
${optionalString (config.vim.ui.breadcrumbs.source == "nvim-navic") '' ${optionalString (breadcrumbsCfg.enable && breadcrumbsCfg.source == "nvim-navic") ''
winbar = { winbar = {
lualine_c = { lualine_c = {
{ {