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, always_divide_middle = true,
globalstatus = ${boolToString cfg.globalStatus}, globalstatus = ${boolToString cfg.globalStatus},
ignore_focus = {'NvimTree'}, ignore_focus = {'NvimTree'},
extensions = {${optionalString config.vim.filetree.nvimTreeLua.enable "'nvim-tree'"}},
refresh = { refresh = {
statusline = ${toString cfg.refresh.statusline}, statusline = ${toString cfg.refresh.statusline},
tabline = ${toString cfg.refresh.tabline}, tabline = ${toString cfg.refresh.tabline},

View file

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