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;
};
plugins = {
# Tablinee
# Tabline
barbar.enable = true;
# TODO Investigate bufferline?
# Status line
@ -52,17 +52,21 @@
enable = true;
inactiveSections = sections;
sections = {
lualine_a = [
{
name = ''string.format('%d', vim.fn.line('$'))'';
}
"location"
];
lualine_a = [{
name = ''string.format('%d', vim.fn.line('$'))'';
}];
lualine_b = [
"mode"
];
lualine_c = [{
name = "filename";
color = {
__raw = ''
function(section)
return { fg = vim.bo.modified and '${base08}' or '${normal.fg}' }
end
'';
};
extraConfig = {
path = 1; # Relative path
symbols = {
@ -72,8 +76,12 @@
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: {
name = "diagnostics";
extraConfig = {
@ -117,7 +125,7 @@
b = inverted // { bg = mode_color; gui = "bold"; };
c = normal;
x = inverted;
y = inverted;
y = normal;
z = inverted // { bg = mode_color; };
})
{
@ -132,11 +140,16 @@
b = normal_ina // { bg = base00; gui = "bold"; };
c = normal_ina;
x = inverted_ina;
y = inverted_ina;
y = normal_ina;
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;
};
};
# 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
surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes)

View file

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