75fa0ae5af
GitOrigin-RevId: c3ab5ea047e6dc73df530948f7367455749d8906
36 lines
732 B
Nix
36 lines
732 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.programs.vim-vint;
|
|
|
|
yamlFormat = pkgs.formats.yaml { };
|
|
|
|
in {
|
|
meta.maintainers = [ maintainers.tomodachi94 ];
|
|
|
|
options = {
|
|
programs.vim-vint = {
|
|
enable = mkEnableOption "the Vint linter for Vimscript";
|
|
package = mkPackageOption pkgs "vim-vint" { };
|
|
|
|
settings = mkOption {
|
|
type = yamlFormat.type;
|
|
default = { };
|
|
description = ''
|
|
Configuration written to
|
|
{file}`$XDG_CONFIG_HOME/.vintrc.yaml`
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.packages = [ cfg.package ];
|
|
|
|
xdg.configFile.".vintrc.yaml".source =
|
|
yamlFormat.generate "vim-vint-config" cfg.settings;
|
|
};
|
|
}
|