{
  config,
  lib,
  ...
}: {
  options.dotfiles.inputs.nixvim.programs.nixvim.plugins.gitmessenger.enable =
    lib.dotfiles.mkEnableOption;

  config =
    lib.mkIf
    config.dotfiles.inputs.nixvim.programs.nixvim.plugins.gitmessenger.enable
    {
      programs.nixvim = {
        keymaps = [
          {
            action = "vim.cmd.GitMessenger";
            key = "<leader>gl";
            lua = true;
            mode = "n";
            options.silent = true;
          }
        ];

        plugins.gitmessenger = {
          enable = true;
          floatingWinOps.border = "rounded";
          includeDiff = "current";
          noDefaultMappings = true;
          popupContentMargins = false;
        };
      };
    };
}
