refactor: move lualine files into their own dir

This commit is contained in:
NotAShelf 2023-02-03 18:54:14 +03:00
parent 645c50a610
commit e738e44c6a
No known key found for this signature in database
GPG key ID: 419DBDD3228990BE
6 changed files with 95 additions and 3 deletions

View file

@ -5,7 +5,6 @@
... ...
}: { }: {
imports = [ imports = [
./lualine.nix ./lualine
./config.nix
]; ];
} }

View file

@ -0,0 +1,87 @@
{
pkgs,
config,
lib,
...
}:
with lib; {
config = {
vim.statusline.lualine = {
enable = mkDefault false;
icons = mkDefault true;
theme = mkDefault "auto";
sectionSeparator = {
left = mkDefault "";
right = mkDefault "";
};
componentSeparator = {
left = mkDefault "";
right = mkDefault "";
};
activeSection = {
a = mkDefault "{'mode'}";
b = mkDefault ''
{
{
"filename",
color = {bg='none'}
},
}
'';
c = mkDefault ''
{
{
"branch",
icon = ''
},
}
'';
x = mkDefault ''
{
{
"diagnostics",
sources = {'nvim_lsp'},
separator = '',
symbols = {error = '', warn = '', info = '', hint = ''}
},
}
'';
y = mkDefault ''
{
{
"fileformat",
color = {bg='none'}
},
},
'';
z = mkDefault ''
{
{
"progress",
color = {bg='none'}
},
"location",
{
"filetype",
color = {
bg='none',
fg='lavender'
},
},
}
'';
};
inactiveSection = {
a = mkDefault "{}";
b = mkDefault "{}";
c = mkDefault "{'filename'}";
x = mkDefault "{'location'}";
y = mkDefault "{}";
z = mkDefault "{}";
};
};
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./lualine.nix
./config.nix
];
}

View file

@ -7,7 +7,7 @@
with lib; with lib;
with builtins; let with builtins; let
cfg = config.vim.statusline.lualine; cfg = config.vim.statusline.lualine;
supported_themes = import ./supported_lualine_themes.nix; supported_themes = import ./supported_themes.nix;
in { in {
options.vim.statusline.lualine = { options.vim.statusline.lualine = {
enable = mkOption { enable = mkOption {