From 6e21655c3ffe18315f59e4de9a246a7c8d14ce9d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jun 2023 01:49:38 +0300 Subject: [PATCH] feat: customizable cursorline option --- modules/ui/modes/config.nix | 4 +++- modules/ui/modes/modes.nix | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/ui/modes/config.nix b/modules/ui/modes/config.nix index 067a2e14..bb7130e5 100644 --- a/modules/ui/modes/config.nix +++ b/modules/ui/modes/config.nix @@ -14,7 +14,9 @@ in { ]; vim.luaConfigRC.modes-nvim = nvim.dag.entryAnywhere '' - require('modes').setup() + require('modes').setup({ + set_cursorline = ${boolToString cfg.setCursorline}, -- looks ugly + }) ''; }; } diff --git a/modules/ui/modes/modes.nix b/modules/ui/modes/modes.nix index a1b2dcc4..0633bb51 100644 --- a/modules/ui/modes/modes.nix +++ b/modules/ui/modes/modes.nix @@ -1,11 +1,13 @@ -{ - config, - lib, - ... -}: +{lib, ...}: with lib; with builtins; { options.vim.ui.modes-nvim = { enable = mkEnableOption "modes.nvim's prismatic line decorations"; + + setCursorline = mkOption { + type = types.bool; + description = "Set a colored cursorline on current line"; + default = false; + }; }; }