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

36 lines
688 B
Nix
Raw Normal View History

{
lib,
helpers,
...
}:
with lib;
2024-12-22 09:58:27 +00:00
with lib.nixvim.plugins;
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;
optionsRenamedToSettings = [
{
old = "formatOnSave";
new = "fmt_autosave";
}
2024-05-05 19:39:35 +02:00
];
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
};
}