mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-16 17:11:02 +00:00
nvimWebDevicons: rename to nvim-web-devicons; switch to setupOpts
This commit is contained in:
parent
646da9d37a
commit
47b5d51f5c
6 changed files with 79 additions and 8 deletions
|
|
@ -31,10 +31,6 @@ in {
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.nvimWebDevicons.enable {
|
|
||||||
vim.startPlugins = ["nvim-web-devicons"];
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkIf cfg.scrollBar.enable {
|
(mkIf cfg.scrollBar.enable {
|
||||||
vim.startPlugins = ["scrollbar-nvim"];
|
vim.startPlugins = ["scrollbar-nvim"];
|
||||||
vim.pluginRC.scrollBar = entryAnywhere ''
|
vim.pluginRC.scrollBar = entryAnywhere ''
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{...}: {
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./fidget
|
||||||
|
./nvim-web-devicons
|
||||||
|
|
||||||
./config.nix
|
./config.nix
|
||||||
./visuals.nix
|
./visuals.nix
|
||||||
./fidget
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
modules/plugins/visuals/nvim-web-devicons/config.nix
Normal file
21
modules/plugins/visuals/nvim-web-devicons/config.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
|
||||||
|
cfg = config.vim.visuals.nvim-web-devicons;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["nvim-web-devicons"];
|
||||||
|
|
||||||
|
pluginRC.nvim-web-devicons = entryAnywhere ''
|
||||||
|
require("nvim-web-devicons").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/plugins/visuals/nvim-web-devicons/default.nix
Normal file
6
modules/plugins/visuals/nvim-web-devicons/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./nvim-web-devicons.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||||
|
inherit (lib.types) nullOr attrsOf attrs enum;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule ["vim" "visuals" "nvimWebDevicons"] ["vim" "visuals" "nvim-web-devicons"])
|
||||||
|
];
|
||||||
|
|
||||||
|
options.vim.visuals.nvim-web-devicons = {
|
||||||
|
enable = mkEnableOption "Neovim dev icons [nvim-web-devicons]";
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "nvim-web-devicons" {
|
||||||
|
color_icons = mkEnableOption "different highlight colors per icon";
|
||||||
|
variant = mkOption {
|
||||||
|
type = nullOr (enum ["light" "dark"]);
|
||||||
|
default = null;
|
||||||
|
description = "Set the light or dark variant manually, instead of relying on `background`";
|
||||||
|
};
|
||||||
|
|
||||||
|
override = mkOption {
|
||||||
|
type = attrsOf attrs;
|
||||||
|
default = {};
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
zsh = {
|
||||||
|
name = "Zsh";
|
||||||
|
icon = "";
|
||||||
|
color = "#428850";
|
||||||
|
cterm_color = "65";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Your personal icon overrides.
|
||||||
|
|
||||||
|
You can specify color or cterm_color instead of specifying
|
||||||
|
both of them. DevIcon will be appended to `name`
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -12,8 +12,6 @@ in {
|
||||||
options.vim.visuals = {
|
options.vim.visuals = {
|
||||||
enable = mkEnableOption "Visual enhancements.";
|
enable = mkEnableOption "Visual enhancements.";
|
||||||
|
|
||||||
nvimWebDevicons.enable = mkEnableOption "dev icons. Required for certain plugins [nvim-web-devicons].";
|
|
||||||
|
|
||||||
scrollBar.enable = mkEnableOption "scrollbar [scrollbar.nvim]";
|
scrollBar.enable = mkEnableOption "scrollbar [scrollbar.nvim]";
|
||||||
|
|
||||||
smoothScroll.enable = mkEnableOption "smooth scrolling [cinnamon-nvim]";
|
smoothScroll.enable = mkEnableOption "smooth scrolling [cinnamon-nvim]";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue