diff options
| author | seth <[email protected]> | 2024-07-16 19:04:27 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-07-16 22:24:21 -0400 |
| commit | 2e7e1ce219b43bb74f67875200dd4b68758ffd27 (patch) | |
| tree | 11ca91f55aa47c5b341aaf65f3626c9681a22b07 /nixvim/plugins/lint.nix | |
| parent | 255e7c40af44aeedf19a3ca682cfc8a098266e8a (diff) | |
back to nixvim againnixvim-again
Diffstat (limited to 'nixvim/plugins/lint.nix')
| -rw-r--r-- | nixvim/plugins/lint.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nixvim/plugins/lint.nix b/nixvim/plugins/lint.nix new file mode 100644 index 0000000..ca751fb --- /dev/null +++ b/nixvim/plugins/lint.nix @@ -0,0 +1,27 @@ +{ pkgs, helpers, ... }: +{ + extraPackages = [ + pkgs.actionlint + pkgs.nodePackages.alex + pkgs.statix + ]; + + plugins.lint = { + enable = true; + + # Run linters declared in lintersByFt + # then alex on all files + autoCmd.callback = helpers.mkRaw '' + function() + require("lint").try_lint() + require("lint").try_lint("alex") + end + ''; + + lintersByFt = { + githubaction = [ "actionlint" ]; + lua = [ "selene" ]; + nix = [ "statix" ]; + }; + }; +} |
