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

+29-26
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

+13-41
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

+6-3
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

+6-6
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

+1-3
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

+1-3
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

+1-3
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

+6-6
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

+4-22
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

+4-2
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
};

plugins/by-name/neo-tree/default.nix

+2-6
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,9 @@ in
104104
gitStatusAsync = helpers.defaultNullOpts.mkBool true "";
105105

106106
gitStatusAsyncOptions = {
107-
batchSize =
108-
helpers.defaultNullOpts.mkInt 1000
109-
"How many lines of git status results to process at a time";
107+
batchSize = helpers.defaultNullOpts.mkInt 1000 "How many lines of git status results to process at a time";
110108

111-
batchDelay =
112-
helpers.defaultNullOpts.mkInt 10
113-
"delay in ms between batches. Spreads out the workload to let other processes run.";
109+
batchDelay = helpers.defaultNullOpts.mkInt 10 "delay in ms between batches. Spreads out the workload to let other processes run.";
114110

115111
maxLines = helpers.defaultNullOpts.mkInt 10000 ''
116112
How many lines of git status results to process. Anything after this will be dropped.

plugins/by-name/neogit/options.nix

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ in
4444

4545
git_services = helpers.defaultNullOpts.mkAttrsOf types.str {
4646
"github.com" = "https://github.com/$\{owner}/$\{repository}/compare/$\{branch_name}?expand=1";
47-
"bitbucket.org" = "https://bitbucket.org/$\{owner}/$\{repository}/pull-requests/new?source=$\{branch_name}&t=1";
48-
"gitlab.com" = "https://gitlab.com/$\{owner}/$\{repository}/merge_requests/new?merge_request[source_branch]=$\{branch_name}";
47+
"bitbucket.org" =
48+
"https://bitbucket.org/$\{owner}/$\{repository}/pull-requests/new?source=$\{branch_name}&t=1";
49+
"gitlab.com" =
50+
"https://gitlab.com/$\{owner}/$\{repository}/merge_requests/new?merge_request[source_branch]=$\{branch_name}";
4951
} "Used to generate URL's for branch popup action 'pull request'.";
5052

5153
fetch_after_checkout = helpers.defaultNullOpts.mkBool false ''

plugins/by-name/rust-tools/default.nix

+2-6
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,11 @@ in
4848

4949
maxLenAlign = lib.nixvim.defaultNullOpts.mkBool false "whether to align to the length of the longest line in the file";
5050

51-
maxLenAlignPadding =
52-
lib.nixvim.defaultNullOpts.mkUnsignedInt 1
53-
"padding from the left if max_len_align is true";
51+
maxLenAlignPadding = lib.nixvim.defaultNullOpts.mkUnsignedInt 1 "padding from the left if max_len_align is true";
5452

5553
rightAlign = lib.nixvim.defaultNullOpts.mkBool false "whether to align to the extreme right or not";
5654

57-
rightAlignPadding =
58-
lib.nixvim.defaultNullOpts.mkInt 7
59-
"padding from the right if right_align is true";
55+
rightAlignPadding = lib.nixvim.defaultNullOpts.mkInt 7 "padding from the right if right_align is true";
6056

6157
highlight = lib.nixvim.defaultNullOpts.mkStr "Comment" "The color of the hints";
6258
};

plugins/by-name/telescope/extensions/live-greps-args.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ mkExtension {
4848
mappings = {
4949
i = {
5050
"<C-k>".__raw = ''require("telescope-live-grep-args.actions").quote_prompt()'';
51-
"<C-i>".__raw = ''require("telescope-live-grep-args.actions").quote_prompt({ postfix = " --iglob " })'';
51+
"<C-i>".__raw =
52+
''require("telescope-live-grep-args.actions").quote_prompt({ postfix = " --iglob " })'';
5253
"<C-space>".__raw = ''require("telescope.actions").to_fuzzy_refine'';
5354
};
5455
};

plugins/by-name/vim-matchup/default.nix

+2-6
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,9 @@ with lib;
7777
Set this conservatively since high values may cause performance issues.
7878
'';
7979

80-
timeout =
81-
helpers.defaultNullOpts.mkInt 300
82-
"Adjust timeouts in milliseconds for matchparen highlighting";
80+
timeout = helpers.defaultNullOpts.mkInt 300 "Adjust timeouts in milliseconds for matchparen highlighting";
8381

84-
insertTimeout =
85-
helpers.defaultNullOpts.mkInt 60
86-
"Adjust timeouts in milliseconds for matchparen highlighting";
82+
insertTimeout = helpers.defaultNullOpts.mkInt 60 "Adjust timeouts in milliseconds for matchparen highlighting";
8783

8884
deferred = {
8985
enable = helpers.defaultNullOpts.mkBool false ''

plugins/by-name/which-key/default.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
377377
zindex = defaultNullOpts.mkUnsignedInt 1000 "Layer depth on the popup window.";
378378

379379
wo = {
380-
winblend = defaultNullOpts.mkNullableWithRaw (types.ints.between 0
381-
100
382-
) 0 "`0` for fully opaque and `100` for fully transparent.";
380+
winblend =
381+
defaultNullOpts.mkNullableWithRaw (types.ints.between 0 100) 0
382+
"`0` for fully opaque and `100` for fully transparent.";
383383
};
384384
};
385385

plugins/by-name/yazi/default.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
138138
NOTE: this only works if `use_ya_for_events_reading` is enabled, etc.
139139
'';
140140

141-
floating_window_scaling_factor =
142-
defaultNullOpts.mkNum 0.9
143-
"The floating window scaling factor. 1 means 100%, 0.9 means 90%, etc.";
141+
floating_window_scaling_factor = defaultNullOpts.mkNum 0.9 "The floating window scaling factor. 1 means 100%, 0.9 means 90%, etc.";
144142

145143
yazi_floating_window_winblend = defaultNullOpts.mkNullableWithRaw' {
146144
type = types.ints.between 0 100;

plugins/colorschemes/catppuccin.nix

+2-11
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,8 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
9494
(
9595
old: new:
9696
lib.mkRenamedOptionModule
97-
[
98-
"colorschemes"
99-
"catppuccin"
100-
old
101-
]
102-
[
103-
"colorschemes"
104-
"catppuccin"
105-
"settings"
106-
new
107-
]
97+
[ "colorschemes" "catppuccin" old ]
98+
[ "colorschemes" "catppuccin" "settings" new ]
10899
)
109100
{
110101
showBufferEnd = "show_end_of_buffer";

0 commit comments

Comments
 (0)