mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-24 04:15:18 +00:00
fun/syntax-gaslighting: add plugin
This commit is contained in:
parent
544c2c99ea
commit
ef5cf386c1
6 changed files with 72 additions and 0 deletions
|
|
@ -18,5 +18,6 @@ in {
|
|||
./nvim-web-devicons
|
||||
./rainbow-delimiters
|
||||
./tiny-devicons-auto-colors
|
||||
./syntax-gaslighting
|
||||
];
|
||||
}
|
||||
|
|
|
|||
20
modules/plugins/visuals/syntax-gaslighting/config.nix
Normal file
20
modules/plugins/visuals/syntax-gaslighting/config.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.fun.syntax-gaslighting;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["syntax-gaslighting"];
|
||||
pluginRC.colorful-menu-nvim = entryAnywhere ''
|
||||
require("syntax-gaslighting").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/visuals/syntax-gaslighting/default.nix
Normal file
6
modules/plugins/visuals/syntax-gaslighting/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./syntax-gaslighting.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) str nullOr listOf bool;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.fun = {
|
||||
syntax-gaslighting = {
|
||||
enable = mkEnableOption "Thats no even a real option, you're crazy.";
|
||||
|
||||
setupOpts = mkPluginSetupOption "syntax-gaslighting" {
|
||||
messages = mkOption {
|
||||
type = nullOr (listOf str);
|
||||
default = null;
|
||||
description = "Custom messages for gaslighting.";
|
||||
};
|
||||
|
||||
merge_messages = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Merge user messages with the default ones.
|
||||
If disabled, the messages table will override default messages.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue