mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 01:38:40 +02:00
plugins/zig: switch to settings option
This commit is contained in:
parent
f3cfd84f9b
commit
60c6912126
1 changed files with 19 additions and 8 deletions
|
@ -12,14 +12,25 @@ with helpers.vim-plugin;
|
||||||
originalName = "zig.vim";
|
originalName = "zig.vim";
|
||||||
defaultPackage = pkgs.vimPlugins.zig-vim;
|
defaultPackage = pkgs.vimPlugins.zig-vim;
|
||||||
globalPrefix = "zig_";
|
globalPrefix = "zig_";
|
||||||
deprecateExtraConfig = true;
|
|
||||||
|
|
||||||
# Possibly add option to disable Treesitter highlighting if this is installed
|
# TODO introduced 2024-03-02: remove 2024-05-02
|
||||||
options = {
|
deprecateExtraConfig = true;
|
||||||
formatOnSave = mkDefaultOpt {
|
imports = [
|
||||||
type = types.bool;
|
(
|
||||||
global = "fmt_autosave";
|
mkRenamedOptionModule
|
||||||
description = "Run zig fmt on save";
|
["plugins" "zig" "formatOnSave"]
|
||||||
|
["plugins" "zig" "settings" "fmt_autosave"]
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
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`.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
fmt_autosave = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue