feat(lualine): minor refactor

This commit is contained in:
NotAShelf 2023-04-18 01:53:08 +03:00
parent 104c21c904
commit b499930661
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
2 changed files with 4 additions and 11 deletions

View file

@ -22,6 +22,7 @@ in {
always_divide_middle = true,
globalstatus = ${boolToString cfg.globalStatus},
ignore_focus = {'NvimTree'},
extensions = {${optionalString config.vim.filetree.nvimTreeLua.enable "'nvim-tree'"}},
refresh = {
statusline = ${toString cfg.refresh.statusline},
tabline = ${toString cfg.refresh.tabline},

View file

@ -8,11 +8,7 @@ with builtins; let
supported_themes = import ./supported_themes.nix;
in {
options.vim.statusline.lualine = {
enable = mkOption {
type = types.bool;
description = "Enable lualine statusline";
default = true;
};
enable = mkEnableOption "lualine";
icons = {
enable = mkOption {
@ -47,6 +43,7 @@ in {
};
theme = mkOption {
description = "Theme for lualine";
default = "auto";
type = types.enum (
[
@ -82,13 +79,8 @@ in {
"tomorrow"
"wombat"
]
++ (
if elem config.vim.theme.name supported_themes
then [config.vim.theme.name]
else []
)
++ optional (elem config.vim.theme.name supported_themes) config.vim.theme.name
);
description = "Theme for lualine";
};
sectionSeparator = {