neovim-flake/modules/plugins/visuals/visuals.nix

59 lines
1.4 KiB
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) int bool str;
2024-03-24 01:14:39 +01:00
inherit (lib.nvim.binds) mkMappingOption;
cfg = config.vim.visuals;
in {
options.vim.visuals = {
enable = mkEnableOption "Visual enhancements.";
cellularAutomaton = {
enable = mkEnableOption "cellular automaton [cellular-automaton]";
mappings = {
makeItRain = mkMappingOption "Make it rain [cellular-automaton]" "<leader>fml";
};
};
highlight-undo = {
enable = mkEnableOption "highlight undo [highlight-undo]";
highlightForCount = mkOption {
2024-03-24 01:14:39 +01:00
type = bool;
default = true;
description = ''
2023-10-22 00:54:56 +02:00
Enable support for highlighting when a <count> is provided before the key
If set to false it will only highlight when the mapping is not prefixed with a <count>
'';
};
duration = mkOption {
2024-03-24 01:14:39 +01:00
type = int;
description = "Duration of highlight";
default = 500;
};
undo = {
hlGroup = mkOption {
2024-03-24 01:14:39 +01:00
type = str;
description = "Highlight group for undo";
default = "HighlightUndo";
};
};
redo = {
hlGroup = mkOption {
2024-03-24 01:14:39 +01:00
type = str;
description = "Highlight group for redo";
default = "HighlightUndo";
};
};
};
};
}