mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
treewide: begin restructuring the module tree
This commit is contained in:
parent
e1835f6c46
commit
7c730a78e5
254 changed files with 749 additions and 664 deletions
21
modules/plugins/ui/modes/config.nix
Normal file
21
modules/plugins/ui/modes/config.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.ui.modes-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"modes-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.modes-nvim = entryAnywhere ''
|
||||
require('modes').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/ui/modes/default.nix
Normal file
6
modules/plugins/ui/modes/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./modes.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
48
modules/plugins/ui/modes/modes.nix
Normal file
48
modules/plugins/ui/modes/modes.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) bool str float;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.ui.modes-nvim = {
|
||||
enable = mkEnableOption "modes.nvim's prismatic line decorations";
|
||||
|
||||
setupOpts = {
|
||||
setCursorline = mkOption {
|
||||
type = bool;
|
||||
description = "Set a colored cursorline on current line";
|
||||
default = false; # looks ugly, disabled by default
|
||||
};
|
||||
|
||||
line_opacity = {
|
||||
visual = mkOption {
|
||||
type = float;
|
||||
description = "Set opacity for cursorline and number background";
|
||||
default = 0.0;
|
||||
};
|
||||
};
|
||||
|
||||
colors = mkPluginSetupOption "modes.nvim" {
|
||||
copy = mkOption {
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#f5c359";
|
||||
};
|
||||
delete = mkOption {
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#c75c6a";
|
||||
};
|
||||
insert = mkOption {
|
||||
type = str;
|
||||
description = "The #RRGGBB color code for the visual mode highlights";
|
||||
default = "#78ccc5";
|
||||
};
|
||||
visual = mkOption {
|
||||
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