mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-02-14 19:30:19 +01:00
24 lines
445 B
Nix
24 lines
445 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;
|
|
};
|
|
}
|