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