nix-community.nixvim/plugins/by-name/zig/default.nix

45 lines
800 B
Nix
Raw Normal View History

{
lib,
helpers,
...
}:
with lib;
with lib.nixvim.vim-plugin;
mkVimPlugin {
2024-05-05 19:39:35 +02:00
name = "zig";
packPathName = "zig.vim";
package = "zig-vim";
2024-05-05 19:39:35 +02:00
globalPrefix = "zig_";
2024-03-02 23:41:38 +01:00
2024-05-05 19:39:35 +02:00
maintainers = [ maintainers.GaetanLepage ];
2024-05-05 19:39:35 +02:00
# TODO introduced 2024-03-02: remove 2024-05-02
deprecateExtraConfig = true;
imports = [
(mkRenamedOptionModule
[
"plugins"
"zig"
"formatOnSave"
]
[
"plugins"
"zig"
"settings"
"fmt_autosave"
]
)
];
2024-03-02 23:41:38 +01:00
2024-05-05 19:39:35 +02:00
settingsOptions = {
2024-09-08 13:52:18 +01:00
fmt_autosave = helpers.defaultNullOpts.mkFlagInt 1 ''
2024-05-05 19:39:35 +02:00
This plugin enables automatic code formatting on save by default using zig fmt.
2024-09-08 13:52:18 +01:00
To disable it, you can set this option to `0`.
2024-05-05 19:39:35 +02:00
'';
};
2021-03-31 13:56:18 +01:00
2024-05-05 19:39:35 +02:00
settingsExample = {
2024-09-08 13:52:18 +01:00
fmt_autosave = 0;
2024-05-05 19:39:35 +02:00
};
}