mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-09 03:56:05 +01:00
plugins/blame-nvim: init
This commit is contained in:
parent
9a4a68a80d
commit
c074710027
2 changed files with 73 additions and 0 deletions
19
plugins/by-name/blame-nvim/default.nix
Normal file
19
plugins/by-name/blame-nvim/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "blame-nvim";
|
||||||
|
moduleName = "blame";
|
||||||
|
description = "fugitive.vim-style `git blame` visualizer for Neovim";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.axka ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
date_format = "%Y-%m-%d";
|
||||||
|
views.default = lib.nixvim.nestedLiteralLua "require('blame.views.virtual_view')";
|
||||||
|
format_fn = lib.nixvim.nestedLiteralLua "require('blame.formats.default_formats').date_message";
|
||||||
|
colors = [
|
||||||
|
"Pink"
|
||||||
|
"Aqua"
|
||||||
|
"#ffffff"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
54
tests/test-sources/plugins/by-name/blame-nvim/default.nix
Normal file
54
tests/test-sources/plugins/by-name/blame-nvim/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.blame-nvim.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.blame-nvim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
date_format = "%d.%m.%Y";
|
||||||
|
relative_date_if_recent = true;
|
||||||
|
virtual_style = "right_align";
|
||||||
|
views = {
|
||||||
|
window.__raw = "require('blame.views.window_view')";
|
||||||
|
virtual.__raw = "require('blame.views.virtual_view')";
|
||||||
|
default.__raw = "require('blame.views.window_view')";
|
||||||
|
};
|
||||||
|
focus_blame = true;
|
||||||
|
merge_consecutive = false;
|
||||||
|
max_summary_width = 30;
|
||||||
|
colors = null; # won't output literal nil
|
||||||
|
blame_options = null; # won't output literal nil
|
||||||
|
format_fn.__raw = "require('blame.formats.default_formats').commit_date_author_fn";
|
||||||
|
commit_detail_view = "vsplit";
|
||||||
|
mappings = {
|
||||||
|
commit_info = "i";
|
||||||
|
stack_push = "<TAB>";
|
||||||
|
stack_pop = "<BS>";
|
||||||
|
show_commit = "<CR>";
|
||||||
|
close = [
|
||||||
|
"<esc>"
|
||||||
|
"q"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.blame-nvim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
date_format = "%Y-%m-%d";
|
||||||
|
views.default.__raw = "require('blame.views.virtual_view')";
|
||||||
|
format_fn.__raw = "require('blame.formats.default_formats').date_message";
|
||||||
|
colors = [
|
||||||
|
"Pink"
|
||||||
|
"Aqua"
|
||||||
|
"#ffffff"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue