Revert "Factor out diagnostics like LSPs"

This commit is contained in:
Ching Pei Yang 2026-06-12 22:22:21 +02:00 committed by GitHub
commit 6cddf8560b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 662 additions and 1023 deletions

View file

@ -96,9 +96,6 @@
};
clang-format.command = getExe' pkgs.clang-tools "clang-format";
};
defaultDiagnosticsProvider = ["cpplint"];
diagnosticsProviders = ["cpplint"];
in {
options.vim.languages.clang = {
enable = mkEnableOption "C/C++ language support";
@ -171,21 +168,6 @@ in {
description = "C formatter to use";
};
};
extraDiagnostics = {
enable =
mkEnableOption "extra C/C++ diagnostics via nvim-lint"
// {
default = config.vim.languages.enableExtraDiagnostics;
defaultText = literalExpression "config.vim.languages.enableExtraDiagnostics";
};
types = mkOption {
type = listOf (enum diagnosticsProviders);
default = defaultDiagnosticsProvider;
description = "extra C/C++ diagnostics providers";
};
};
};
config = mkIf cfg.enable (mkMerge [
@ -229,18 +211,5 @@ in {
};
};
})
(mkIf cfg.extraDiagnostics.enable {
vim.diagnostics = {
presets = genAttrs cfg.extraDiagnostics.types (_: {enable = true;});
nvim-lint = {
enable = true;
linters_by_ft = {
c = cfg.extraDiagnostics.types;
cpp = cfg.extraDiagnostics.types;
};
};
};
})
]);
}