Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* vim-vint: add module * vim-vint: add tests * maintainers: add tomodachi94 * vim-vint: fix tests --------- Co-authored-by: Naïm Favier <n@monade.li>
- Loading branch information
1 parent
e716961
commit ffc022b
Showing
8 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ config, pkgs, lib, xdg, ... }: | ||
|
||
{ | ||
programs.vim-vint = { | ||
enable = true; | ||
settings = { | ||
cmdargs = { | ||
severity = "error"; | ||
color = true; | ||
env = { neovim = true; }; | ||
}; | ||
policies = { | ||
ProhibitEqualTildeOperator.enabled = false; | ||
ProhibitUsingUndeclaredVariable.enabled = false; | ||
ProhibitAbbreviationOption.enabled = false; | ||
ProhibitImplicitScopeVariable.enabled = false; | ||
ProhibitSetNoCompatible.enabled = false; | ||
}; | ||
}; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContent home-files/.config/.vintrc.yaml ${ | ||
./basic-configuration.yaml | ||
} | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cmdargs: | ||
color: true | ||
env: | ||
neovim: true | ||
severity: error | ||
policies: | ||
ProhibitAbbreviationOption: | ||
enabled: false | ||
ProhibitEqualTildeOperator: | ||
enabled: false | ||
ProhibitImplicitScopeVariable: | ||
enabled: false | ||
ProhibitSetNoCompatible: | ||
enabled: false | ||
ProhibitUsingUndeclaredVariable: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ vim-vint-basic-configuration = ./basic-configuration.nix; } |