summaryrefslogtreecommitdiffstats
path: root/modules/plugins/visuals/cinnamon-nvim/cinnamon-nvim.nix
blob: 2173e3be8cdd25af17c27525a9b43138f45935c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{lib, ...}: let
  inherit (lib.modules) mkRemovedOptionModule;
  inherit (lib.options) mkOption mkEnableOption;
  inherit (lib.types) attrs;
  inherit (lib.nvim.types) mkPluginSetupOption;
in {
  imports = [
    (mkRemovedOptionModule ["vim" "visuals" "smoothScroll"] ''
      `vim.visuals.smoothScroll` has been removed. You may consider enabling the
      option `vim.visuals.cinnamon-nvim` to repliace previous smooth scrolling
      behaviour.
    '')
  ];

  options.vim.visuals.cinnamon-nvim = {
    enable = mkEnableOption "smooth scrolling for ANY command [cinnamon-nvim]";
    setupOpts = mkPluginSetupOption "cinnamon.nvim" {
      options = mkOption {
        type = attrs;
        default = {
          # Defaults provided for the sake of documentation only!
          # Who would've guessed setupOpts.options would be confusing?
          mode = "cursor";
          count_only = false;
        };
        description = "Scroll options";
      };

      keymaps = {
        basic = mkEnableOption "basic animation keymaps";
        extra = mkEnableOption "extra animation keymaps";
      };
    };
  };
}