treewide: Reformat with nixfmt

This commit is contained in:
traxys 2024-05-05 19:39:35 +02:00
parent c6281260dc
commit 62f32bfc71
459 changed files with 28139 additions and 26377 deletions

View file

@ -4,7 +4,8 @@
config,
pkgs,
...
}: let
}:
let
# The keys are the option name in nixvim (under plugins.julia-cell.keymaps)
# cmd: Such that the mapping action is ':JuliaCell${cmd}<CR>'
# desc: The description of the option.
@ -35,66 +36,62 @@
};
};
in
with lib;
helpers.vim-plugin.mkVimPlugin config {
name = "julia-cell";
originalName = "vim-julia-cell";
defaultPackage = pkgs.vimPlugins.vim-julia-cell;
globalPrefix = "julia_cell_";
with lib;
helpers.vim-plugin.mkVimPlugin config {
name = "julia-cell";
originalName = "vim-julia-cell";
defaultPackage = pkgs.vimPlugins.vim-julia-cell;
globalPrefix = "julia_cell_";
maintainers = [maintainers.GaetanLepage];
maintainers = [ maintainers.GaetanLepage ];
# TODO introduced 2024-02-19: remove 2024-04-19
deprecateExtraConfig = true;
optionsRenamedToSettings = [
"delimitCellsBy"
"tag"
];
# TODO introduced 2024-02-19: remove 2024-04-19
deprecateExtraConfig = true;
optionsRenamedToSettings = [
"delimitCellsBy"
"tag"
];
settingsOptions = {
delimit_cells_by = helpers.defaultNullOpts.mkEnumFirstDefault ["marks" "tags"] ''
settingsOptions = {
delimit_cells_by =
helpers.defaultNullOpts.mkEnumFirstDefault
[
"marks"
"tags"
]
''
Specifies if cells are delimited by 'marks' or 'tags'.
'';
tag = helpers.defaultNullOpts.mkStr "##" "Specifies the tag format.";
};
tag = helpers.defaultNullOpts.mkStr "##" "Specifies the tag format.";
};
extraOptions = {
keymaps =
{
silent = mkOption {
type = types.bool;
description = "Whether julia-cell keymaps should be silent";
default = false;
};
}
// (
mapAttrs
(
name: value:
helpers.mkNullOrOption types.str "Keymap for ${value.desc}."
)
mappings
);
};
extraOptions = {
keymaps =
{
silent = mkOption {
type = types.bool;
description = "Whether julia-cell keymaps should be silent";
default = false;
};
}
// (mapAttrs (name: value: helpers.mkNullOrOption types.str "Keymap for ${value.desc}.") mappings);
};
extraConfig = cfg: {
keymaps = flatten (
mapAttrsToList
(
name: value: let
key = cfg.keymaps.${name};
in
optional
(key != null)
{
mode = "n";
inherit key;
action = ":JuliaCell${value.cmd}<CR>";
options.silent = cfg.keymaps.silent;
}
)
mappings
);
};
}
extraConfig = cfg: {
keymaps = flatten (
mapAttrsToList (
name: value:
let
key = cfg.keymaps.${name};
in
optional (key != null) {
mode = "n";
inherit key;
action = ":JuliaCell${value.cmd}<CR>";
options.silent = cfg.keymaps.silent;
}
) mappings
);
};
}