mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-23 21:13:28 +00:00
diagnostics/presets: init
This commit is contained in:
parent
69f386eca6
commit
92d33a5dc9
55 changed files with 1023 additions and 662 deletions
23
modules/plugins/diagnostics/presets/sqruff.nix
Normal file
23
modules/plugins/diagnostics/presets/sqruff.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.types) mkDiagnosticsPresetEnableOption;
|
||||
|
||||
cfg = config.vim.diagnostics.presets.sqruff;
|
||||
in {
|
||||
options.vim.diagnostics.presets.sqruff = {
|
||||
enable = mkDiagnosticsPresetEnableOption "sqruff" "Sqruff";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.diagnostics.nvim-lint.linters.sqruff = {
|
||||
cmd = getExe pkgs.sqruff;
|
||||
args = ["lint" "--format=json" "-"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue