Skip to content

Commit dd73afe

Browse files
committed
treewide: format with new nixfmt
1 parent d63fd77 commit dd73afe

File tree

34 files changed

+637
-651
lines changed

34 files changed

+637
-651
lines changed

flake/lib.nix

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,31 @@
1212
};
1313

1414
# Public `lib` flake output
15-
flake.lib =
16-
{
17-
nixvim = lib.makeOverridable (import ../lib) {
18-
inherit lib;
19-
flake = self;
20-
};
21-
overlay = lib.makeOverridable (import ../lib/overlay.nix) {
22-
flake = self;
23-
};
24-
# Top-top-level aliases
25-
inherit (self.lib.nixvim)
26-
evalNixvim
27-
;
28-
}
29-
// lib.genAttrs config.systems (
30-
lib.flip withSystem (
31-
{ pkgs, system, ... }:
32-
{
33-
# NOTE: this is the publicly documented flake output we've had for a while
34-
check = pkgs.callPackage ../lib/tests.nix {
35-
inherit lib self system;
36-
};
15+
flake.lib = {
16+
nixvim = lib.makeOverridable (import ../lib) {
17+
inherit lib;
18+
flake = self;
19+
};
20+
overlay = lib.makeOverridable (import ../lib/overlay.nix) {
21+
flake = self;
22+
};
23+
# Top-top-level aliases
24+
inherit (self.lib.nixvim)
25+
evalNixvim
26+
;
27+
}
28+
// lib.genAttrs config.systems (
29+
lib.flip withSystem (
30+
{ pkgs, system, ... }:
31+
{
32+
# NOTE: this is the publicly documented flake output we've had for a while
33+
check = pkgs.callPackage ../lib/tests.nix {
34+
inherit lib self system;
35+
};
3736

38-
# NOTE: no longer needs to be per-system
39-
helpers = lib.warn "nixvim: `<nixvim>.lib.${system}.helpers` has been moved to `<nixvim>.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim;
40-
}
41-
)
42-
);
37+
# NOTE: no longer needs to be per-system
38+
helpers = lib.warn "nixvim: `<nixvim>.lib.${system}.helpers` has been moved to `<nixvim>.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim;
39+
}
40+
)
41+
);
4342
}

lib/modules.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ in
5050
modulesPath = ../modules;
5151
# TODO: deprecate `helpers`
5252
helpers = self;
53-
} // extraSpecialArgs;
53+
}
54+
// extraSpecialArgs;
5455
};
5556
}
5657
// lib.mapAttrs (

modules/keymaps.nix

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,19 @@
4949
warnings =
5050
let
5151
# All keymap options that have historically supported the `lua` sub-option
52-
keymapOptions =
53-
[
54-
options.keymaps
55-
options.keymapsOnEvents
56-
options.plugins.wtf.keymaps.ai
57-
options.plugins.wtf.keymaps.search
58-
# NOTE: lsp `diagnostic` and `lspBuf` don't use `mapOptionSubmodule` yet
59-
# So we only need `lua` deprecation in lsp's `extra` option
60-
options.plugins.lsp.keymaps.extra
61-
# NOTE: tmux-navigator added `mapOptionSubmodule` support _after_ branching off 24.05
62-
options.plugins.tmux-navigator.keymaps
63-
]
64-
# NOTE: barbar added `mapOptionSubmodule` support shortly _before_ branching off 24.05
65-
++ builtins.attrValues (builtins.removeAttrs options.plugins.barbar.keymaps [ "silent" ]);
52+
keymapOptions = [
53+
options.keymaps
54+
options.keymapsOnEvents
55+
options.plugins.wtf.keymaps.ai
56+
options.plugins.wtf.keymaps.search
57+
# NOTE: lsp `diagnostic` and `lspBuf` don't use `mapOptionSubmodule` yet
58+
# So we only need `lua` deprecation in lsp's `extra` option
59+
options.plugins.lsp.keymaps.extra
60+
# NOTE: tmux-navigator added `mapOptionSubmodule` support _after_ branching off 24.05
61+
options.plugins.tmux-navigator.keymaps
62+
]
63+
# NOTE: barbar added `mapOptionSubmodule` support shortly _before_ branching off 24.05
64+
++ builtins.attrValues (builtins.removeAttrs options.plugins.barbar.keymaps [ "silent" ]);
6665
in
6766
lib.pipe keymapOptions [
6867
(map (opt: (opt.type.getSubOptions opt.loc).lua))

modules/plugins.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ let
66
by-name = ../plugins/by-name;
77
in
88
{
9-
imports =
10-
[ ../plugins ]
11-
++ foldlAttrs (
12-
prev: name: type:
13-
prev ++ optional (type == "directory") (by-name + "/${name}")
14-
) [ ] (readDir by-name);
9+
imports = [
10+
../plugins
11+
]
12+
++ foldlAttrs (
13+
prev: name: type:
14+
prev ++ optional (type == "directory") (by-name + "/${name}")
15+
) [ ] (readDir by-name);
1516
}

plugins/by-name/clangd-extensions/deprecations.nix

Lines changed: 71 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -7,79 +7,78 @@ let
77
];
88
in
99
{
10-
imports =
11-
[
12-
(mkRemovedOptionModule (basePluginPath ++ [ "server" ]) ''
13-
To configure the `clangd` language server options, please use
14-
`plugins.lsp.servers.clangd.extraSettings`.
15-
'')
16-
(mkRemovedOptionModule (
17-
basePluginPath
18-
++ [
19-
"extensions"
20-
"autoSetHints"
21-
]
22-
) "")
23-
]
24-
++ (map
25-
(
26-
optionPath:
27-
mkRenamedOptionModule (basePluginPath ++ [ "extensions" ] ++ optionPath) (
28-
basePluginPath ++ optionPath
29-
)
10+
imports = [
11+
(mkRemovedOptionModule (basePluginPath ++ [ "server" ]) ''
12+
To configure the `clangd` language server options, please use
13+
`plugins.lsp.servers.clangd.extraSettings`.
14+
'')
15+
(mkRemovedOptionModule (
16+
basePluginPath
17+
++ [
18+
"extensions"
19+
"autoSetHints"
20+
]
21+
) "")
22+
]
23+
++ (map
24+
(
25+
optionPath:
26+
mkRenamedOptionModule (basePluginPath ++ [ "extensions" ] ++ optionPath) (
27+
basePluginPath ++ optionPath
3028
)
29+
)
30+
[
31+
[
32+
"inlayHints"
33+
"inline"
34+
]
35+
[
36+
"inlayHints"
37+
"onlyCurrentLine"
38+
]
39+
[
40+
"inlayHints"
41+
"onlyCurrentLineAutocmd"
42+
]
43+
[
44+
"inlayHints"
45+
"showParameterHints"
46+
]
47+
[
48+
"inlayHints"
49+
"parameterHintsPrefix"
50+
]
3151
[
32-
[
33-
"inlayHints"
34-
"inline"
35-
]
36-
[
37-
"inlayHints"
38-
"onlyCurrentLine"
39-
]
40-
[
41-
"inlayHints"
42-
"onlyCurrentLineAutocmd"
43-
]
44-
[
45-
"inlayHints"
46-
"showParameterHints"
47-
]
48-
[
49-
"inlayHints"
50-
"parameterHintsPrefix"
51-
]
52-
[
53-
"inlayHints"
54-
"otherHintsPrefix"
55-
]
56-
[
57-
"inlayHints"
58-
"maxLenAlign"
59-
]
60-
[
61-
"inlayHints"
62-
"maxLenAlignPadding"
63-
]
64-
[
65-
"inlayHints"
66-
"rightAlign"
67-
]
68-
[
69-
"inlayHints"
70-
"rightAlignPadding"
71-
]
72-
[
73-
"inlayHints"
74-
"highlight"
75-
]
76-
[
77-
"inlayHints"
78-
"priority"
79-
]
80-
[ "ast" ]
81-
[ "memoryUsage" ]
82-
[ "symbolInfo" ]
52+
"inlayHints"
53+
"otherHintsPrefix"
8354
]
84-
);
55+
[
56+
"inlayHints"
57+
"maxLenAlign"
58+
]
59+
[
60+
"inlayHints"
61+
"maxLenAlignPadding"
62+
]
63+
[
64+
"inlayHints"
65+
"rightAlign"
66+
]
67+
[
68+
"inlayHints"
69+
"rightAlignPadding"
70+
]
71+
[
72+
"inlayHints"
73+
"highlight"
74+
]
75+
[
76+
"inlayHints"
77+
"priority"
78+
]
79+
[ "ast" ]
80+
[ "memoryUsage" ]
81+
[ "symbolInfo" ]
82+
]
83+
);
8584
}

plugins/by-name/crates/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ lib.nixvim.plugins.mkNeovimPlugin {
66

77
maintainers = [ lib.maintainers.GaetanLepage ];
88

9-
imports =
10-
[ { cmpSourcePlugins.crates = "crates"; } ]
11-
++
9+
imports = [
10+
{ cmpSourcePlugins.crates = "crates"; }
11+
]
12+
++
1213
# TODO introduced 2024-12-12: remove after 25.05
1314
lib.nixvim.mkSettingsRenamedOptionModules [ "plugins" "crates-nvim" ]
1415
[ "plugins" "crates" ]

plugins/by-name/dap-python/default.nix

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,22 @@ lib.nixvim.plugins.mkNeovimPlugin {
7878
plugins.dap = {
7979
enable = true;
8080

81-
extensionConfigLua =
82-
''
83-
require("dap-python").setup("${cfg.adapterPythonPath}", ${toLuaObject cfg.settings})
84-
''
85-
+ (optionalString (cfg.testRunners != null) ''
86-
table.insert(require("dap-python").test_runners,
87-
${toLuaObject (builtins.mapAttrs (_: lib.nixvim.mkRaw) cfg.testRunners)})
88-
'')
89-
+ (optionalString (cfg.customConfigurations != null) ''
90-
table.insert(require("dap").configurations.python, ${toLuaObject cfg.customConfigurations})
91-
'')
92-
+ (optionalString (cfg.resolvePython != null) ''
93-
require("dap-python").resolve_python = ${toLuaObject cfg.resolvePython}
94-
'')
95-
+ (optionalString (cfg.testRunner != null) ''
96-
require("dap-python").test_runner = ${toLuaObject cfg.testRunner};
97-
'');
81+
extensionConfigLua = ''
82+
require("dap-python").setup("${cfg.adapterPythonPath}", ${toLuaObject cfg.settings})
83+
''
84+
+ (optionalString (cfg.testRunners != null) ''
85+
table.insert(require("dap-python").test_runners,
86+
${toLuaObject (builtins.mapAttrs (_: lib.nixvim.mkRaw) cfg.testRunners)})
87+
'')
88+
+ (optionalString (cfg.customConfigurations != null) ''
89+
table.insert(require("dap").configurations.python, ${toLuaObject cfg.customConfigurations})
90+
'')
91+
+ (optionalString (cfg.resolvePython != null) ''
92+
require("dap-python").resolve_python = ${toLuaObject cfg.resolvePython}
93+
'')
94+
+ (optionalString (cfg.testRunner != null) ''
95+
require("dap-python").test_runner = ${toLuaObject cfg.testRunner};
96+
'');
9897
};
9998
};
10099

plugins/by-name/dap/dapHelpers.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ rec {
3434
The filetype to use for content retrieved via a source request.
3535
'';
3636
};
37-
} // attrs;
37+
}
38+
// attrs;
3839
};
3940

4041
executableAdapterOption = mkAdapterType {

plugins/by-name/dap/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ lib.nixvim.plugins.mkNeovimPlugin {
7878
DapStopped = dapStopped;
7979
DapBreakpointRejected = dapBreakpointRejected;
8080
};
81-
} // cfg.settings;
81+
}
82+
// cfg.settings;
8283
in
8384
{
8485
plugins.dap.luaConfig.content = lib.mkMerge [

plugins/by-name/dashboard/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ lib.nixvim.plugins.mkNeovimPlugin {
190190
action = "Telescope find_files cwd=";
191191
```
192192
'';
193-
} // extraOptions;
193+
}
194+
// extraOptions;
194195
};
195196
in
196197
{

0 commit comments

Comments
 (0)