mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-21 06:16:33 +00:00
diagnostics/presets: init
This commit is contained in:
parent
cd45295f9c
commit
0735ee8cfd
49 changed files with 892 additions and 575 deletions
23
modules/plugins/diagnostics/presets/taplo.nix
Normal file
23
modules/plugins/diagnostics/presets/taplo.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.taplo;
|
||||
in {
|
||||
options.vim.diagnostics.presets.taplo = {
|
||||
enable = mkDiagnosticsPresetEnableOption "taplo" "Taplo";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.diagnostics.nvim-lint.linters.taplo = {
|
||||
cmd = getExe pkgs.taplo;
|
||||
args = ["lint"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue