mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-02-13 19:00:19 +01:00
22 lines
435 B
Nix
22 lines
435 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib; {
|
|
options.plugins.headerguard = {
|
|
enable = mkEnableOption "Enable headerguard";
|
|
|
|
useCppComment = mkEnableOption "Use c++-style comments instead of c-style";
|
|
};
|
|
|
|
config = let
|
|
cfg = config.plugins.headerguard;
|
|
in
|
|
mkIf cfg.enable {
|
|
extraPlugins = with pkgs.vimPlugins; [vim-headerguard];
|
|
|
|
globals.headerguard_use_cpp_comments = cfg.useCppComment;
|
|
};
|
|
}
|