From e08599d6b2dee6230f7a9aa8a79a406baf66d3d6 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 19 May 2023 15:14:25 +0300 Subject: [PATCH] feat: cursorlineopt config option --- modules/basic/config.nix | 8 +------- modules/basic/module.nix | 6 ++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/basic/config.nix b/modules/basic/config.nix index 5e91a4a..a3e62c2 100644 --- a/modules/basic/config.nix +++ b/modules/basic/config.nix @@ -75,14 +75,8 @@ in { set shortmess+=c set tm=${toString cfg.mapTimeout} set hidden + set cursorlineopt=${toString cfg.cursorlineOpt} - ${optionalString cfg.theme.transparent '' - " this needs to be set if the theme is transparent - set cursorlineopt=number - " override when vim is opened or a new buffer is entered - autocmd VimEnter * setlocal cursorlineopt=number - autocmd BufWinEnter * setlocal cursorlineopt=number - ''} ${optionalString cfg.splitBelow '' set splitbelow ''} diff --git a/modules/basic/module.nix b/modules/basic/module.nix index d06838e..e93c4d4 100644 --- a/modules/basic/module.nix +++ b/modules/basic/module.nix @@ -145,6 +145,12 @@ with builtins; { description = "Follow editorconfig rules in current directory"; }; + cursorlineOpt = mkOption { + type = types.enum ["line" "screenline" "number" "both"]; + default = "line"; + description = "Highlight the text line of the cursor with CursorLine hl-CursorLine"; + }; + enableLuaLoader = mkEnableOption "Enable the experimental Lua module loader to speed up the start up process"; }; }