2023-02-05 11:12:28 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.vim-vint;
|
|
|
|
|
|
|
|
yamlFormat = pkgs.formats.yaml { };
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ maintainers.tomodachi94 ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.vim-vint = {
|
2023-07-02 01:45:18 +02:00
|
|
|
enable = mkEnableOption "the Vint linter for Vimscript";
|
|
|
|
package = mkPackageOption pkgs "vim-vint" { };
|
2023-02-05 11:12:28 +01:00
|
|
|
|
|
|
|
settings = mkOption {
|
|
|
|
type = yamlFormat.type;
|
|
|
|
default = { };
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2023-02-05 11:12:28 +01:00
|
|
|
Configuration written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`$XDG_CONFIG_HOME/.vintrc.yaml`
|
2023-02-05 11:12:28 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [ cfg.package ];
|
|
|
|
|
|
|
|
xdg.configFile.".vintrc.yaml".source =
|
|
|
|
yamlFormat.generate "vim-vint-config" cfg.settings;
|
|
|
|
};
|
|
|
|
}
|