2023-02-01 19:11:37 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 00:50:27 +00:00
|
|
|
}: let
|
2023-10-14 11:04:48 +00:00
|
|
|
inherit (lib) mkEnableOption mkMappingOption mkOption types literalExpression mkRenamedOptionModule mkRemovedOptionModule;
|
2023-11-07 00:50:27 +00:00
|
|
|
|
2023-04-17 23:34:41 +00:00
|
|
|
cfg = config.vim.visuals;
|
|
|
|
in {
|
2023-10-14 11:04:48 +00:00
|
|
|
imports = [
|
2023-11-24 09:05:19 +00:00
|
|
|
(mkRenamedOptionModule ["vim" "visuals" "indentBlankline" "showCurrContext"] ["vim" "visuals" "indentBlankline" "scope" "enabled"])
|
2023-10-14 11:04:48 +00:00
|
|
|
(mkRenamedOptionModule ["vim" "visuals" "indentBlankline" "showEndOfLine"] ["vim" "visuals" "indentBlankline" "scope" "showEndOfLine"])
|
|
|
|
(mkRemovedOptionModule ["vim" "visuals" "indentBlankline" "useTreesitter"] "`vim.visuals.indentBlankline.useTreesitter` has been removed upstream and can safely be removed from your configuration.")
|
|
|
|
];
|
|
|
|
|
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-10-14 11:04:48 +00:00
|
|
|
debounce = mkOption {
|
|
|
|
type = types.int;
|
|
|
|
description = "Debounce time in milliseconds";
|
|
|
|
default = 200;
|
|
|
|
};
|
|
|
|
|
|
|
|
viewportBuffer = {
|
|
|
|
min = mkOption {
|
|
|
|
type = types.int;
|
|
|
|
description = "Number of lines above and below of what is currently
|
|
|
|
visible in the window";
|
|
|
|
default = 30;
|
|
|
|
};
|
|
|
|
|
|
|
|
max = mkOption {
|
|
|
|
type = types.int;
|
|
|
|
description = "Number of lines above and below of what is currently
|
|
|
|
visible in the window";
|
|
|
|
default = 500;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
indent = {
|
|
|
|
char = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "Character for indentation line";
|
|
|
|
default = "│";
|
|
|
|
};
|
|
|
|
};
|
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-10-14 11:04:48 +00:00
|
|
|
scope = {
|
2023-11-24 09:05:19 +00:00
|
|
|
enabled = mkOption {
|
|
|
|
description = "Highlight current scope from treesitter";
|
|
|
|
type = types.bool;
|
|
|
|
default = config.vim.treesitter.enable;
|
|
|
|
defaultText = literalExpression "config.vim.treesitter.enable";
|
|
|
|
};
|
|
|
|
|
2023-10-14 11:04:48 +00:00
|
|
|
showEndOfLine = mkOption {
|
|
|
|
description = ''
|
|
|
|
Displays the end of line character set by [](#opt-vim.visuals.indentBlankline.eolChar) instead of the
|
|
|
|
indent guide on line returns.
|
|
|
|
'';
|
|
|
|
type = types.bool;
|
|
|
|
default = cfg.indentBlankline.eolChar != null;
|
|
|
|
defaultText = literalExpression "config.vim.visuals.indentBlankline.eolChar != null";
|
|
|
|
};
|
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-11-04 11:30:04 +00:00
|
|
|
description = ''
|
2023-10-21 22:54:56 +00: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-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
|
|
|
};
|
|
|
|
}
|