nvim.nix/config/plugins/ui/lualine.nix

76 lines
1.7 KiB
Nix
Raw Normal View History

2024-08-04 21:19:37 +08:00
{ ... }:
{
plugins.lualine = {
enable = true;
globalstatus = true;
theme = "gruvbox-material";
# Load our extensions
extensions = [
2024-08-04 21:23:43 +08:00
"neo-tree"
2024-08-04 21:19:37 +08:00
];
# Icons for our separators
componentSeparators = { left = ""; right = ""; };
sectionSeparators = { left = ""; right = ""; };
# Display components in tabline
2024-08-06 16:05:45 +08:00
tabline = {
lualine_a = [ { name = "buffers"; } ];
lualine_x = [ { name = "hostname"; } ];
lualine_z = [ { name = "encoding"; } ];
};
2024-08-04 21:19:37 +08:00
# Lualine has sections as shown below
# +-------------------------------------------------+
# | A | B | C X | Y | Z |
# +-------------------------------------------------+
sections = {
# Section A
2024-08-06 16:05:45 +08:00
lualine_a = [ { name = "mode"; } ];
2024-08-04 21:19:37 +08:00
# Section B
lualine_b = [
# Git branch
{ name = "branch"; icon = ""; }
# Git diff status
{ name = "diff";
extraConfig.symbols = {
2024-08-06 16:05:45 +08:00
added = "+";
modified = "~";
removed = "-";
2024-08-04 21:19:37 +08:00
};
}
2024-08-06 16:05:45 +08:00
];
# Section C
lualine_c = [ { name = "filename"; } ];
2024-08-04 21:19:37 +08:00
2024-08-06 16:05:45 +08:00
# Section X
lualine_x = [
2024-08-04 21:19:37 +08:00
# Diagnostic count from nvim_lsp
{ name = "diagnostics";
extraConfig = {
sources = [ "nvim_lsp" ];
symbols = {
2024-08-06 16:05:45 +08:00
error = "error:";
warn = "warning:";
info = "info:";
hint = "hint:";
2024-08-04 21:19:37 +08:00
};
};
}
];
# Section Y
lualine_y = [ { name = "progress"; } ];
# Section Z
lualine_z = [ { name = "location"; } ];
};
};
}