2023-02-01 20:11:37 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 01:50:27 +01:00
|
|
|
}: let
|
|
|
|
inherit (lib) mkEnableOption mkMappingOption mkOption types literalExpression;
|
|
|
|
|
2023-04-18 01:34:41 +02:00
|
|
|
cfg = config.vim.visuals;
|
|
|
|
in {
|
2023-02-01 20:11:37 +01:00
|
|
|
options.vim.visuals = {
|
2023-04-18 01:17:36 +02:00
|
|
|
enable = mkEnableOption "Visual enhancements.";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2023-04-18 01:17:36 +02:00
|
|
|
nvimWebDevicons.enable = mkEnableOption "dev icons. Required for certain plugins [nvim-web-devicons].";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2023-10-21 19:15:36 +02:00
|
|
|
scrollBar.enable = mkEnableOption "scrollbar [scrollbar.nvim]";
|
2023-02-03 20:53:38 +01:00
|
|
|
|
2023-10-21 19:15:36 +02:00
|
|
|
smoothScroll.enable = mkEnableOption "smooth scrolling [cinnamon-nvim]";
|
2023-02-03 22:20:20 +01:00
|
|
|
|
2023-04-15 15:35:34 +02:00
|
|
|
cellularAutomaton = {
|
2023-10-21 19:15:36 +02:00
|
|
|
enable = mkEnableOption "cellular automaton [cellular-automaton]";
|
2023-04-15 15:35:34 +02:00
|
|
|
|
|
|
|
mappings = {
|
|
|
|
makeItRain = mkMappingOption "Make it rain [cellular-automaton]" "<leader>fml";
|
|
|
|
};
|
2023-02-05 14:14:25 +01:00
|
|
|
};
|
|
|
|
|
2023-02-28 11:00:38 +01:00
|
|
|
fidget-nvim = {
|
2023-10-21 19:15:36 +02:00
|
|
|
enable = mkEnableOption "nvim LSP UI element [fidget-nvim]";
|
2023-06-05 22:10:25 +02:00
|
|
|
|
2023-02-28 11:00:38 +01:00
|
|
|
align = {
|
|
|
|
bottom = mkOption {
|
|
|
|
type = types.bool;
|
2023-04-02 18:58:57 +02:00
|
|
|
description = "Align to bottom";
|
2023-02-28 11:00:38 +01:00
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
right = mkOption {
|
|
|
|
type = types.bool;
|
2023-04-02 18:58:57 +02:00
|
|
|
description = "Align to right";
|
2023-02-28 11:00:38 +01:00
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-08-07 04:30:06 +02:00
|
|
|
cursorline = {
|
2023-08-08 03:32:14 +02:00
|
|
|
enable = mkEnableOption "line hightlighting on the cursor [nvim-cursorline]";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
|
|
|
lineTimeout = mkOption {
|
|
|
|
type = types.int;
|
2023-04-02 18:58:57 +02:00
|
|
|
description = "Time in milliseconds for cursorline to appear";
|
2023-08-07 04:30:06 +02:00
|
|
|
default = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
lineNumbersOnly = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = "Hightlight only in the presence of line numbers";
|
|
|
|
default = true;
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
indentBlankline = {
|
2023-10-21 19:15:36 +02:00
|
|
|
enable = mkEnableOption "indentation guides [indent-blankline]";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
|
|
|
listChar = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "Character for indentation line";
|
2023-02-28 08:13:56 +01:00
|
|
|
default = "│";
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
fillChar = mkOption {
|
|
|
|
description = "Character to fill indents";
|
2023-04-18 01:17:36 +02:00
|
|
|
type = with types; nullOr types.str;
|
2023-02-28 08:13:56 +01:00
|
|
|
default = "⋅";
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
eolChar = mkOption {
|
|
|
|
description = "Character at end of line";
|
2023-04-18 01:17:36 +02:00
|
|
|
type = with types; nullOr types.str;
|
2023-02-28 08:13:56 +01:00
|
|
|
default = "↴";
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
|
2023-04-18 01:17:36 +02:00
|
|
|
showEndOfLine = mkOption {
|
2023-11-04 12:30:04 +01:00
|
|
|
description = ''
|
2023-11-06 01:46:51 +01:00
|
|
|
Displays the end of line character set by [](#opt-vim.visuals.indentBlankline.eolChar) instead of the
|
2023-04-18 01:17:36 +02:00
|
|
|
indent guide on line returns.
|
|
|
|
'';
|
2023-02-01 20:11:37 +01:00
|
|
|
type = types.bool;
|
2023-04-18 01:17:36 +02:00
|
|
|
default = cfg.indentBlankline.eolChar != null;
|
|
|
|
defaultText = literalExpression "config.vim.visuals.indentBlankline.eolChar != null";
|
|
|
|
};
|
|
|
|
|
|
|
|
showCurrContext = mkOption {
|
2023-02-01 20:11:37 +01:00
|
|
|
description = "Highlight current context from treesitter";
|
2023-04-18 01:17:36 +02:00
|
|
|
type = types.bool;
|
|
|
|
default = config.vim.treesitter.enable;
|
|
|
|
defaultText = literalExpression "config.vim.treesitter.enable";
|
|
|
|
};
|
|
|
|
|
|
|
|
useTreesitter = mkOption {
|
|
|
|
description = "Use treesitter to calculate indentation when possible.";
|
|
|
|
type = types.bool;
|
|
|
|
default = config.vim.treesitter.enable;
|
|
|
|
defaultText = literalExpression "config.vim.treesitter.enable";
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
};
|
2023-10-22 00:22:31 +02:00
|
|
|
|
|
|
|
highlight-undo = {
|
|
|
|
enable = mkEnableOption "highlight undo [highlight-undo]";
|
|
|
|
|
|
|
|
highlightForCount = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
2023-11-04 12:30:04 +01:00
|
|
|
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>
|
2023-10-22 00:22:31 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
duration = mkOption {
|
|
|
|
type = types.int;
|
|
|
|
description = "Duration of highlight";
|
2023-10-23 19:15:31 +02:00
|
|
|
default = 500;
|
2023-10-22 00:22:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
undo = {
|
|
|
|
hlGroup = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "Highlight group for undo";
|
|
|
|
default = "HighlightUndo";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
redo = {
|
|
|
|
hlGroup = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "Highlight group for redo";
|
|
|
|
default = "HighlightUndo";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
}
|