mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -5,9 +5,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.gitblame;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
plugins.gitblame = {
|
||||
enable = mkEnableOption "gitblame";
|
||||
|
@ -22,40 +24,47 @@ in {
|
|||
|
||||
highlightGroup = helpers.defaultNullOpts.mkStr "Comment" "The highlight group for virtual text.";
|
||||
|
||||
displayVirtualText = helpers.defaultNullOpts.mkNullable (types.nullOr types.bool) (toString true) "If the blame message should be displayed as virtual text. You may want to disable this if you display the blame message in statusline.";
|
||||
displayVirtualText =
|
||||
helpers.defaultNullOpts.mkNullable (types.nullOr types.bool) (toString true)
|
||||
"If the blame message should be displayed as virtual text. You may want to disable this if you display the blame message in statusline.";
|
||||
|
||||
ignoredFiletypes = helpers.defaultNullOpts.mkNullable (types.listOf types.str) (toString []) "A list of filetypes for which gitblame information will not be displayed.";
|
||||
ignoredFiletypes = helpers.defaultNullOpts.mkNullable (types.listOf types.str) (toString
|
||||
[ ]
|
||||
) "A list of filetypes for which gitblame information will not be displayed.";
|
||||
|
||||
delay = helpers.defaultNullOpts.mkUnsignedInt 0 "The delay in milliseconds after which the blame info will be displayed.";
|
||||
delay =
|
||||
helpers.defaultNullOpts.mkUnsignedInt 0
|
||||
"The delay in milliseconds after which the blame info will be displayed.";
|
||||
|
||||
virtualTextColumn = helpers.defaultNullOpts.mkNullable types.ints.unsigned (toString null) "Have the blame message start at a given column instead of EOL. If the current line is longer than the specified column value the blame message will default to being displayed at EOL.";
|
||||
virtualTextColumn =
|
||||
helpers.defaultNullOpts.mkNullable types.ints.unsigned (toString null)
|
||||
"Have the blame message start at a given column instead of EOL. If the current line is longer than the specified column value the blame message will default to being displayed at EOL.";
|
||||
|
||||
extmarkOptions = helpers.defaultNullOpts.mkAttributeSet (toString null) "nvim_buf_set_extmark optional parameters. (Warning: overwriting id and virt_text will break the plugin behavior)";
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
setupOptions = {
|
||||
enabled = cfg.enable;
|
||||
message_template = cfg.messageTemplate;
|
||||
date_format = cfg.dateFormat;
|
||||
message_when_not_committed = cfg.messageWhenNotCommitted;
|
||||
highlight_group = cfg.highlightGroup;
|
||||
display_virtual_text = helpers.ifNonNull' cfg.displayVirtualText (
|
||||
if cfg.displayVirtualText
|
||||
then 1
|
||||
else 0
|
||||
);
|
||||
ignored_filetypes = cfg.ignoredFiletypes;
|
||||
inherit (cfg) delay;
|
||||
virtual_text_column = cfg.virtualTextColumn;
|
||||
set_extmark_options = cfg.extmarkOptions;
|
||||
};
|
||||
in
|
||||
config =
|
||||
let
|
||||
setupOptions = {
|
||||
enabled = cfg.enable;
|
||||
message_template = cfg.messageTemplate;
|
||||
date_format = cfg.dateFormat;
|
||||
message_when_not_committed = cfg.messageWhenNotCommitted;
|
||||
highlight_group = cfg.highlightGroup;
|
||||
display_virtual_text = helpers.ifNonNull' cfg.displayVirtualText (
|
||||
if cfg.displayVirtualText then 1 else 0
|
||||
);
|
||||
ignored_filetypes = cfg.ignoredFiletypes;
|
||||
inherit (cfg) delay;
|
||||
virtual_text_column = cfg.virtualTextColumn;
|
||||
set_extmark_options = cfg.extmarkOptions;
|
||||
};
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
extraPackages = [pkgs.git];
|
||||
extraPackages = [ pkgs.git ];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('gitblame').setup${helpers.toLuaObject setupOptions}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue