nix-community.nixvim/plugins/languages/zig.nix

46 lines
834 B
Nix
Raw Normal View History

{
lib,
helpers,
pkgs,
...
}:
with lib;
with helpers.vim-plugin;
mkVimPlugin {
2024-05-05 19:39:35 +02:00
name = "zig";
originalName = "zig.vim";
defaultPackage = pkgs.vimPlugins.zig-vim;
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 = {
fmt_autosave = helpers.defaultNullOpts.mkBool true ''
This plugin enables automatic code formatting on save by default using zig fmt.
To disable it, you can set this option to `false`.
'';
};
2021-03-31 13:56:18 +01:00
2024-05-05 19:39:35 +02:00
settingsExample = {
fmt_autosave = false;
};
}