vim/decoration: Small adjustments

This commit is contained in:
Geoffrey Frogeye 2024-01-23 23:38:48 +01:00
parent 09b201ca24
commit dfc8d68495
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 27 additions and 11 deletions

View file

@ -38,7 +38,7 @@
title = true; title = true;
}; };
plugins = { plugins = {
# Tablinee # Tabline
barbar.enable = true; barbar.enable = true;
# TODO Investigate bufferline? # TODO Investigate bufferline?
# Status line # Status line
@ -52,17 +52,21 @@
enable = true; enable = true;
inactiveSections = sections; inactiveSections = sections;
sections = { sections = {
lualine_a = [ lualine_a = [{
{
name = ''string.format('%d', vim.fn.line('$'))''; name = ''string.format('%d', vim.fn.line('$'))'';
} }];
"location"
];
lualine_b = [ lualine_b = [
"mode" "mode"
]; ];
lualine_c = [{ lualine_c = [{
name = "filename"; name = "filename";
color = {
__raw = ''
function(section)
return { fg = vim.bo.modified and '${base08}' or '${normal.fg}' }
end
'';
};
extraConfig = { extraConfig = {
path = 1; # Relative path path = 1; # Relative path
symbols = { symbols = {
@ -72,8 +76,12 @@
unnamed = "󱀶"; unnamed = "󱀶";
}; };
}; };
}]; }
lualine_x = (lib.mapAttrsToList "location"];
lualine_x = [{
name = ''(next(vim.lsp.buf_get_clients()) == nil) and "󰒲 " or ""'';
extraConfig.separator = { left = ""; right = ""; };
}] ++ (lib.mapAttrsToList
(diag_name: diag_color: { (diag_name: diag_color: {
name = "diagnostics"; name = "diagnostics";
extraConfig = { extraConfig = {
@ -117,7 +125,7 @@
b = inverted // { bg = mode_color; gui = "bold"; }; b = inverted // { bg = mode_color; gui = "bold"; };
c = normal; c = normal;
x = inverted; x = inverted;
y = inverted; y = normal;
z = inverted // { bg = mode_color; }; z = inverted // { bg = mode_color; };
}) })
{ {
@ -132,11 +140,16 @@
b = normal_ina // { bg = base00; gui = "bold"; }; b = normal_ina // { bg = base00; gui = "bold"; };
c = normal_ina; c = normal_ina;
x = inverted_ina; x = inverted_ina;
y = inverted_ina; y = normal_ina;
z = normal_ina // { bg = base00; }; z = normal_ina // { bg = base00; };
}; };
}; };
}; };
# Show context on top if scrolled out
treesitter-context = {
enable = true;
maxLines = 5;
};
}; };
}; };
}; };

View file

@ -70,6 +70,8 @@
overrideGenericSorter = true; overrideGenericSorter = true;
}; };
}; };
# TODO Go to any symbol in the current working directory, for when LSP doesn't support it.
# Or at least something to live_grep the curent word.
# Surrounding pairs # Surrounding pairs
surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes) surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes)

View file

@ -10,6 +10,7 @@
''; '';
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [
fugitive-gitlab-vim # Open files in GitLab fugitive-gitlab-vim # Open files in GitLab
# TODO Investigate gitlinker instead
]; ];
plugins = { plugins = {
fugitive.enable = true; # Git basics fugitive.enable = true; # Git basics