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

@ -5,7 +5,8 @@
pkgs,
...
}:
with lib; {
with lib;
{
options.plugins.inc-rename = {
enable = mkEnableOption "inc-rename, a plugin previewing LSP renaming";
@ -13,9 +14,7 @@ with lib; {
cmdName = helpers.defaultNullOpts.mkStr "IncRename" "the name of the command";
hlGroup =
helpers.defaultNullOpts.mkStr "Substitute"
"the highlight group used for highlighting the identifier's new name";
hlGroup = helpers.defaultNullOpts.mkStr "Substitute" "the highlight group used for highlighting the identifier's new name";
previewEmptyName = helpers.defaultNullOpts.mkBool false ''
whether an empty new name should be previewed; if false the command preview will be cancelled
@ -26,7 +25,7 @@ with lib; {
whether to display a `Renamed m instances in n files` message after a rename operation
'';
inputBufferType = helpers.defaultNullOpts.mkNullable (types.enum ["dressing"]) "null" ''
inputBufferType = helpers.defaultNullOpts.mkNullable (types.enum [ "dressing" ]) "null" ''
the type of the external input buffer to use
'';
@ -35,19 +34,20 @@ with lib; {
'';
};
config = let
cfg = config.plugins.inc-rename;
setupOptions = {
cmd_name = cfg.cmdName;
hl_group = cfg.hlGroup;
preview_empty_name = cfg.previewEmptyName;
show_message = cfg.showMessage;
input_buffer_type = cfg.inputBufferType;
post_hook = cfg.postHook;
};
in
config =
let
cfg = config.plugins.inc-rename;
setupOptions = {
cmd_name = cfg.cmdName;
hl_group = cfg.hlGroup;
preview_empty_name = cfg.previewEmptyName;
show_message = cfg.showMessage;
input_buffer_type = cfg.inputBufferType;
post_hook = cfg.postHook;
};
in
mkIf cfg.enable {
extraPlugins = [cfg.package];
extraPlugins = [ cfg.package ];
extraConfigLua = ''
require("inc_rename").setup(${helpers.toLuaObject setupOptions})