Skip to content

Commit ae78fac

Browse files
GaetanLepageMattSturgeon
authored andcommitted
treewide: format with latest nixfmt
1 parent c6080c2 commit ae78fac

File tree

22 files changed

+100
-185
lines changed

22 files changed

+100
-185
lines changed

lib/vim-plugin.nix

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -75,33 +75,36 @@
7575
};
7676
};
7777

78-
options.${namespace}.${name} = {
79-
enable = lib.mkEnableOption originalName;
80-
package =
81-
if lib.isOption package then
82-
package
83-
else
84-
lib.mkPackageOption pkgs originalName {
85-
default =
86-
if builtins.isList package then
87-
package
88-
else
89-
[
90-
"vimPlugins"
78+
options.${namespace}.${name} =
79+
{
80+
enable = lib.mkEnableOption originalName;
81+
package =
82+
if lib.isOption package then
83+
package
84+
else
85+
lib.mkPackageOption pkgs originalName {
86+
default =
87+
if builtins.isList package then
9188
package
92-
];
93-
};
94-
packageDecorator = lib.mkOption {
95-
type = lib.types.functionTo lib.types.package;
96-
default = lib.id;
97-
defaultText = lib.literalExpression "x: x";
98-
description = ''
99-
Additional transformations to apply to the final installed package.
100-
The result of these transformations is **not** visible in the `package` option's value.
101-
'';
102-
internal = true;
103-
};
104-
} // settingsOption // extraOptions;
89+
else
90+
[
91+
"vimPlugins"
92+
package
93+
];
94+
};
95+
packageDecorator = lib.mkOption {
96+
type = lib.types.functionTo lib.types.package;
97+
default = lib.id;
98+
defaultText = lib.literalExpression "x: x";
99+
description = ''
100+
Additional transformations to apply to the final installed package.
101+
The result of these transformations is **not** visible in the `package` option's value.
102+
'';
103+
internal = true;
104+
};
105+
}
106+
// settingsOption
107+
// extraOptions;
105108

106109
config = lib.mkIf cfg.enable (
107110
lib.mkMerge [

plugins/by-name/auto-session/default.nix

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -62,61 +62,33 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
6262
"enabled"
6363
]
6464
) (settingsPath ++ [ "auto_restore" ]))
65-
66-
(lib.mkRenamedOptionModule (
67-
basePluginPath
68-
++ [
69-
"bypassSessionSaveFileTypes"
70-
]
71-
) (settingsPath ++ [ "bypass_save_filetypes" ]))
65+
(lib.mkRenamedOptionModule (basePluginPath ++ [ "bypassSessionSaveFileTypes" ]) (
66+
settingsPath ++ [ "bypass_save_filetypes" ]
67+
))
7268
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "enableLastSession" ]) (
73-
settingsPath
74-
++ [
75-
"auto_restore_last_session"
76-
]
69+
settingsPath ++ [ "auto_restore_last_session" ]
7770
))
7871
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "rootDir" ]) (
79-
settingsPath
80-
++ [
81-
"root_dir"
82-
]
72+
settingsPath ++ [ "root_dir" ]
8373
))
8474
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "enabled" ]) (
85-
settingsPath
86-
++ [
87-
"enabled"
88-
]
75+
settingsPath ++ [ "enabled" ]
8976
))
9077
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "createEnabled" ]) (
91-
settingsPath
92-
++ [
93-
"auto_create"
94-
]
78+
settingsPath ++ [ "auto_create" ]
9579
))
9680
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "suppressDirs" ]) (
97-
settingsPath
98-
++ [
99-
"suppressed_dirs"
100-
]
81+
settingsPath ++ [ "suppressed_dirs" ]
10182
))
10283
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "allowedDirs" ]) (
103-
settingsPath
104-
++ [
105-
"allowed_dirs"
106-
]
84+
settingsPath ++ [ "allowed_dirs" ]
10785
))
10886
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "useGitBranch" ]) (
109-
settingsPath
110-
++ [
111-
"use_git_branch"
112-
]
87+
settingsPath ++ [ "use_git_branch" ]
11388
))
114-
(lib.mkRemovedOptionModule (
115-
basePluginPath
116-
++ [
117-
"cwdChangeHandling"
118-
]
119-
) ''Please switch to `cwd_change_handling` with just a boolean value.'')
89+
(lib.mkRemovedOptionModule (basePluginPath ++ [ "cwdChangeHandling" ]) ''
90+
Please switch to `cwd_change_handling` with just a boolean value.
91+
'')
12092
];
12193

12294
settingsOptions = {

plugins/by-name/clipboard-image/default.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,12 @@ in
145145

146146
extraConfigLua =
147147
let
148-
setupOptions = {
149-
default = processPluginOptions cfg.default;
150-
} // cfg.filetypes // cfg.extraOptions;
148+
setupOptions =
149+
{
150+
default = processPluginOptions cfg.default;
151+
}
152+
// cfg.filetypes
153+
// cfg.extraOptions;
151154
in
152155
''
153156
require('clipboard-image').setup(${helpers.toLuaObject setupOptions})

plugins/by-name/coverage/default.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ in
183183
'';
184184

185185
summary = {
186-
widthPercentage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
187-
1.0
188-
) 0.7 "Width of the pop-up window.";
186+
widthPercentage =
187+
helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.7
188+
"Width of the pop-up window.";
189189

190-
heightPercentage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
191-
1.0
192-
) 0.5 "Height of the pop-up window.";
190+
heightPercentage =
191+
helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.5
192+
"Height of the pop-up window.";
193193

194194
borders = mapAttrs (optionName: default: helpers.defaultNullOpts.mkStr default "") {
195195
topleft = "╭";

plugins/by-name/dap/dap-go.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ in
2929
delve = {
3030
path = helpers.defaultNullOpts.mkStr "dlv" "The path to the executable dlv which will be used for debugging.";
3131

32-
initializeTimeoutSec =
33-
helpers.defaultNullOpts.mkInt 20
34-
"Time to wait for delve to initialize the debug session.";
32+
initializeTimeoutSec = helpers.defaultNullOpts.mkInt 20 "Time to wait for delve to initialize the debug session.";
3533

3634
port = helpers.defaultNullOpts.mkStr "$\{port}" ''
3735
A string that defines the port to start delve debugger.

plugins/by-name/dap/dap-ui.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ in
192192

193193
maxTypeLength = helpers.mkNullOrOption types.int "Maximum number of characters to allow a type name to fill before trimming.";
194194

195-
maxValueLines =
196-
helpers.defaultNullOpts.mkInt 100
197-
"Maximum number of lines to allow a value to fill before trimming.";
195+
maxValueLines = helpers.defaultNullOpts.mkInt 100 "Maximum number of lines to allow a value to fill before trimming.";
198196
};
199197

200198
selectWindow = helpers.defaultNullOpts.mkLuaFn null ''

plugins/by-name/indent-o-matic/default.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
77
name = "indent-o-matic";
88
maintainers = [ lib.maintainers.alisonjenkins ];
99
settingsOptions = {
10-
max_lines =
11-
defaultNullOpts.mkInt 2048
12-
"Number of lines without indentation before giving up (use -1 for infinite)";
10+
max_lines = defaultNullOpts.mkInt 2048 "Number of lines without indentation before giving up (use -1 for infinite)";
1311
skip_multiline = defaultNullOpts.mkBool false "Skip multi-line comments and strings (more accurate detection but less performant)";
1412
standard_widths = defaultNullOpts.mkListOf types.ints.unsigned [
1513
2

plugins/by-name/lspsaga/default.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ in
317317
Auto save file when the rename is done.
318318
'';
319319

320-
projectMaxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
321-
1.0
322-
) 0.5 "Width for the `project_replace` float window.";
320+
projectMaxWidth =
321+
helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.5
322+
"Width for the `project_replace` float window.";
323323

324-
projectMaxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
325-
1.0
326-
) 0.5 "Height for the `project_replace` float window.";
324+
projectMaxHeight =
325+
helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.5
326+
"Height for the `project_replace` float window.";
327327

328328
keys = {
329329
quit = mkKeymapOption "<C-k>" "Quit rename window or `project_replace` window.";

plugins/by-name/markdown-preview/default.nix

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,12 @@ mkVimPlugin {
3333
];
3434
imports = [
3535
(mkRenamedOptionModule
36-
[
37-
"plugins"
38-
"markdown-preview"
39-
"fileTypes"
40-
]
41-
[
42-
"plugins"
43-
"markdown-preview"
44-
"settings"
45-
"filetypes"
46-
]
36+
[ "plugins" "markdown-preview" "fileTypes" ]
37+
[ "plugins" "markdown-preview" "settings" "filetypes" ]
4738
)
4839
(mkRenamedOptionModule
49-
[
50-
"plugins"
51-
"markdown-preview"
52-
"browserFunc"
53-
]
54-
[
55-
"plugins"
56-
"markdown-preview"
57-
"settings"
58-
"browserfunc"
59-
]
40+
[ "plugins" "markdown-preview" "browserFunc" ]
41+
[ "plugins" "markdown-preview" "settings" "browserfunc" ]
6042
)
6143
];
6244

plugins/by-name/mini/default.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
7272
evaluate_single = true;
7373
items = {
7474
"__unkeyed-1.buildtin_actions".__raw = "require('mini.starter').sections.builtin_actions()";
75-
"__unkeyed-2.recent_files_current_directory".__raw = "require('mini.starter').sections.recent_files(10, false)";
75+
"__unkeyed-2.recent_files_current_directory".__raw =
76+
"require('mini.starter').sections.recent_files(10, false)";
7677
"__unkeyed-3.recent_files".__raw = "require('mini.starter').sections.recent_files(10, true)";
7778
"__unkeyed-4.sessions".__raw = "require('mini.starter').sections.sessions(5, true)";
7879
};
7980
content_hooks = {
8081
"__unkeyed-1.adding_bullet".__raw = "require('mini.starter').gen_hook.adding_bullet()";
81-
"__unkeyed-2.indexing".__raw = "require('mini.starter').gen_hook.indexing('all', { 'Builtin actions' })";
82+
"__unkeyed-2.indexing".__raw =
83+
"require('mini.starter').gen_hook.indexing('all', { 'Builtin actions' })";
8284
"__unkeyed-3.padding".__raw = "require('mini.starter').gen_hook.aligning('center', 'center')";
8385
};
8486
};

0 commit comments

Comments
 (0)