Nixfiles/neovim/plugins/headerguard.nix

25 lines
445 B
Nix
Raw Normal View History

2024-03-11 12:20:53 +01:00
{
config,
lib,
pkgs,
...
}:
2024-05-13 22:45:35 +02:00
with lib;
{
2024-03-11 12:20:53 +01:00
options.plugins.headerguard = {
enable = mkEnableOption "Enable headerguard";
useCppComment = mkEnableOption "Use c++-style comments instead of c-style";
};
2024-05-13 22:45:35 +02:00
config =
let
cfg = config.plugins.headerguard;
in
2024-03-11 12:20:53 +01:00
mkIf cfg.enable {
2024-05-13 22:45:35 +02:00
extraPlugins = with pkgs.vimPlugins; [ vim-headerguard ];
2024-03-11 12:20:53 +01:00
globals.headerguard_use_cpp_comments = cfg.useCppComment;
};
}