feat: reorganize default statusline

This commit is contained in:
NotAShelf 2023-02-03 21:50:06 +03:00
parent c40e918766
commit ede1e7cb2b
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
2 changed files with 42 additions and 100 deletions

View file

@ -17,39 +17,68 @@ with lib; {
};
componentSeparator = {
left = mkDefault "";
right = mkDefault "";
left = mkDefault "";
right = mkDefault "";
};
activeSection = {
# left side of the statusline 4
a = mkDefault "{'mode'}";
b = ''
b = mkDefault ''
{
{
"filename",
color = {bg='none'},
symbols = {modified = '', readonly = ''},
},
}
'';
c = mkDefault ''
{
{
"branch",
separator = '',
icon = ' ',
separator = { left = '(', right = ')'},
},
"diff",
}
'';
c = mkDefault "{'filename'}";
# right side of the statusline (x, y, z)
x = mkDefault ''
{
{
"diagnostics",
sources = {'nvim_lsp'},
separator = '',
symbols = {error = '', warn = '', info = '', hint = ''},
sources = {'nvim_lsp', 'nvim_diagnostic'},
symbols = {error = '', warn = '', info = '', hint = ''}
},
}
'';
y = mkDefault ''
{
{
"fileformat",
color = {bg='none'}
},
}
'';
z = mkDefault ''
{
{
"progress",
color = {
bg='none',
fg='lavender'
}
},
{
"location",
color = {bg='none', fg='lavender'},
},
{
"filetype",
color = {bg='none', fg='lavender'},
},
"fileformat",
"encoding",
}
'';
y = mkDefault "{'progress'}";
z = mkDefault "{'location'}";
};
inactiveSection = {

View file

@ -1,87 +0,0 @@
{
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 "{}";
};
};
};
}