mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-22 17:39:49 +01:00
feat(visuals): Update and configurations
This commit is contained in:
parent
8e2ea2bbfc
commit
ad95175224
3 changed files with 34 additions and 25 deletions
|
@ -68,8 +68,8 @@ inputs: let
|
||||||
fidget-nvim.enable = true;
|
fidget-nvim.enable = true;
|
||||||
indentBlankline = {
|
indentBlankline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fillChar = "";
|
fillChar = null;
|
||||||
eolChar = "";
|
eolChar = null;
|
||||||
showCurrContext = true;
|
showCurrContext = true;
|
||||||
};
|
};
|
||||||
cursorWordline = {
|
cursorWordline = {
|
||||||
|
|
|
@ -14,17 +14,19 @@ in {
|
||||||
vim.wo.colorcolumn = "99999"
|
vim.wo.colorcolumn = "99999"
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
|
|
||||||
${optionalString (cfg.indentBlankline.eolChar != "") ''
|
${optionalString (cfg.indentBlankline.eolChar != null) ''
|
||||||
vim.opt.listchars:append({ eol = "${cfg.indentBlankline.eolChar}" })
|
vim.opt.listchars:append({ eol = "${cfg.indentBlankline.eolChar}" })
|
||||||
''}
|
''}
|
||||||
${optionalString (cfg.indentBlankline.fillChar != "") ''
|
${optionalString (cfg.indentBlankline.fillChar != null) ''
|
||||||
vim.opt.listchars:append({ eol = "${cfg.indentBlankline.fillChar}" })
|
vim.opt.listchars:append({ space = "${cfg.indentBlankline.fillChar}" })
|
||||||
''}
|
''}
|
||||||
|
|
||||||
require("indent_blankline").setup {
|
require("indent_blankline").setup {
|
||||||
|
enabled = true,
|
||||||
char = "${cfg.indentBlankline.listChar}",
|
char = "${cfg.indentBlankline.listChar}",
|
||||||
show_current_context = ${boolToString cfg.indentBlankline.showCurrContext},
|
show_current_context = ${boolToString cfg.indentBlankline.showCurrContext},
|
||||||
show_end_of_line = true,
|
show_end_of_line = ${boolToString cfg.indentBlankline.showEndOfLine},
|
||||||
|
use_treesitter = ${boolToString cfg.indentBlankline.useTreesitter},
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,17 +6,9 @@
|
||||||
with lib;
|
with lib;
|
||||||
with builtins; {
|
with builtins; {
|
||||||
options.vim.visuals = {
|
options.vim.visuals = {
|
||||||
enable = mkOption {
|
enable = mkEnableOption "Visual enhancements.";
|
||||||
type = types.bool;
|
|
||||||
description = "Enable visual enhancements";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
nvimWebDevicons.enable = mkOption {
|
nvimWebDevicons.enable = mkEnableOption "dev icons. Required for certain plugins [nvim-web-devicons].";
|
||||||
type = types.bool;
|
|
||||||
description = "Enable dev icons. required for certain plugins [nvim-web-devicons]";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
scrollBar.enable = mkOption {
|
scrollBar.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -58,15 +50,12 @@ with builtins; {
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorWordline = {
|
cursorWordline = {
|
||||||
enable = mkOption {
|
enable = mkEnableOption "word and delayed line highlight [nvim-cursorline].";
|
||||||
type = types.bool;
|
|
||||||
description = "Enable word and delayed line highlight [nvim-cursorline]";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
lineTimeout = mkOption {
|
lineTimeout = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "Time in milliseconds for cursorline to appear";
|
description = "Time in milliseconds for cursorline to appear";
|
||||||
|
default = 500;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,21 +73,39 @@ with builtins; {
|
||||||
};
|
};
|
||||||
|
|
||||||
fillChar = mkOption {
|
fillChar = mkOption {
|
||||||
type = types.str;
|
|
||||||
description = "Character to fill indents";
|
description = "Character to fill indents";
|
||||||
|
type = with types; nullOr types.str;
|
||||||
default = "⋅";
|
default = "⋅";
|
||||||
};
|
};
|
||||||
|
|
||||||
eolChar = mkOption {
|
eolChar = mkOption {
|
||||||
type = types.str;
|
|
||||||
description = "Character at end of line";
|
description = "Character at end of line";
|
||||||
|
type = with types; nullOr types.str;
|
||||||
default = "↴";
|
default = "↴";
|
||||||
};
|
};
|
||||||
|
|
||||||
showCurrContext = mkOption {
|
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.
|
||||||
|
'';
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = cfg.indentBlankline.eolChar != null;
|
||||||
|
defaultText = literalExpression "config.vim.visuals.indentBlankline.eolChar != null";
|
||||||
|
};
|
||||||
|
|
||||||
|
showCurrContext = mkOption {
|
||||||
description = "Highlight current context from treesitter";
|
description = "Highlight current context from treesitter";
|
||||||
default = true;
|
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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue