mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-14 00:26:54 +00:00
Revert "Factor out diagnostics like LSPs"
This commit is contained in:
parent
9ba45374ef
commit
6cddf8560b
55 changed files with 662 additions and 1023 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue