summaryrefslogtreecommitdiffstats
path: root/modules/plugins/diagnostics/presets/tombi.nix
blob: ab5e200e28b90f8af608912ddf37851d599c24fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
  config,
  lib,
  pkgs,
  ...
}: let
  inherit (lib.modules) mkIf;
  inherit (lib.nvim.types) mkDiagnosticsPresetEnableOption;
  inherit (lib.meta) getExe;

  cfg = config.vim.diagnostics.presets.tombi;
in {
  options.vim.diagnostics.presets.tombi = {
    enable = mkDiagnosticsPresetEnableOption {
      option = "tombi";
      display = "Tombi";
    };
  };

  config = mkIf cfg.enable {
    vim.diagnostics.nvim-lint.linters.tombi = {
      cmd = getExe pkgs.tombi;
      args = ["lint"];
    };
  };
}