From 4281afe9cfe6ad25767ae5caf63a4cd05317deef Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:23:01 +0200 Subject: [PATCH] wip(nvim/lualine): make similar to lazyvim bar --- pkgs/nvim/config/statusline/lualine.nix | 69 +++++++++++++++++++------ 1 file changed, 54 insertions(+), 15 deletions(-) diff --git a/pkgs/nvim/config/statusline/lualine.nix b/pkgs/nvim/config/statusline/lualine.nix index 1a2d424..6cb1293 100644 --- a/pkgs/nvim/config/statusline/lualine.nix +++ b/pkgs/nvim/config/statusline/lualine.nix @@ -1,33 +1,72 @@ -{ +{icons, ...}: { plugins.lualine = { - enable = false; + enable = true; alwaysDivideMiddle = true; globalstatus = true; ignoreFocus = ["neo-tree"]; extensions = ["fzf"]; theme = "auto"; + disabledFiletypes = { + statusline = ["dashboard" "alpha" "starter"]; + }; componentSeparators = { - left = "|"; - right = "|"; + left = "·"; + right = "·"; }; sectionSeparators = { - left = "█"; #  - right = "█"; #  + left = ""; #  + right = ""; #  }; sections = { lualine_a = ["mode"]; - lualine_b = [ + lualine_b = ["branch"]; + lualine_c = [ { - name = "branch"; - icon = ""; + name = "diagnostics"; + extraConfig.symbols = { + error = icons.diagnostics.Error; + warn = icons.diagnostics.Warn; + info = icons.diagnostics.Info; + hint = icons.diagnostics.Hint; + }; } - "diff" - "diagnostics" + { + name = "filetype"; + extraConfig.icon_only = true; + separator = { + left = ""; + right = ""; + }; + padding = { + left = 1; + right = 0; + }; + } + "filename" ]; - lualine_c = ["filename"]; - lualine_x = ["filetype"]; - lualine_y = ["progress"]; - lualine_z = [''" " .. os.date("%R")'']; + + lualine_x = []; + lualine_y = [ + { + name = "progress"; + separator = { + left = " "; + right = " "; + }; + padding = { + left = 1; + right = 1; + }; + } + { + name = "location"; + padding = { + left = 0; + right = 1; + }; + } + ]; + lualine_z = [''" " .. os.date("%I:%M %p"):gsub("0*", "", 1)'']; }; }; }