vim-vint: add module (#3604)
* vim-vint: add module * vim-vint: add tests * maintainers: add tomodachi94 * vim-vint: fix tests --------- Co-authored-by: Naïm Favier <n@monade.li>
This commit is contained in:
parent
e716961d78
commit
ffc022b6a7
8 changed files with 92 additions and 0 deletions
36
modules/programs/vim-vint.nix
Normal file
36
modules/programs/vim-vint.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ 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
|
||||
<filename>$XDG_CONFIG_HOME/.vintrc.yaml</filename>
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile.".vintrc.yaml".source =
|
||||
yamlFormat.generate "vim-vint-config" cfg.settings;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue