mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 19:01:35 +00:00
modules/ui: switch to explicit lib calls
This commit is contained in:
parent
81b9a8a95c
commit
a7531186a8
25 changed files with 251 additions and 272 deletions
|
@ -3,7 +3,9 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim boolToString;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.trivial) boolToString;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.ui.modes-nvim;
|
||||
in {
|
||||
|
@ -12,7 +14,7 @@ in {
|
|||
"modes-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.modes-nvim = nvim.dag.entryAnywhere ''
|
||||
vim.luaConfigRC.modes-nvim = entryAnywhere ''
|
||||
require('modes').setup({
|
||||
set_cursorline = ${boolToString cfg.setCursorline},
|
||||
line_opacity = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./modes.nix
|
||||
./config.nix
|
||||
|
|
|
@ -1,33 +1,31 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) str;
|
||||
in {
|
||||
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; # looks ugly, disabled by default
|
||||
};
|
||||
|
||||
enable = mkEnableOption "prismatic line decorations [modes.nvim]";
|
||||
setCursorline = mkEnableOption "colored cursorline on current line";
|
||||
colors = {
|
||||
copy = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#f5c359";
|
||||
};
|
||||
|
||||
delete = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#c75c6a";
|
||||
};
|
||||
|
||||
insert = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#78ccc5";
|
||||
};
|
||||
|
||||
visual = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#9745be";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue