2023-02-20 11:42:13 +01:00
|
|
|
{
|
|
|
|
lib,
|
2024-02-09 14:21:22 +01:00
|
|
|
helpers,
|
2023-02-20 11:42:13 +01:00
|
|
|
...
|
2024-02-09 14:21:22 +01:00
|
|
|
}:
|
|
|
|
with lib;
|
2024-12-15 20:28:52 +01:00
|
|
|
with lib.nixvim.vim-plugin;
|
2024-09-01 12:36:31 +01:00
|
|
|
mkVimPlugin {
|
2024-05-05 19:39:35 +02:00
|
|
|
name = "zig";
|
2024-12-13 08:27:14 -06:00
|
|
|
packPathName = "zig.vim";
|
2024-09-02 14:05:11 +01:00
|
|
|
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-03-04 09:35:28 +01:00
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
# TODO introduced 2024-03-02: remove 2024-05-02
|
|
|
|
deprecateExtraConfig = true;
|
2024-12-16 10:38:12 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|