mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
nixvim/plugins/firenvim: init
This commit is contained in:
parent
c6bc18035a
commit
26822d655d
5
modules/nixvim/default.nix
Normal file
5
modules/nixvim/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./plugins/firenvim.nix
|
||||
];
|
||||
}
|
36
modules/nixvim/plugins/firenvim.nix
Normal file
36
modules/nixvim/plugins/firenvim.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ config, lib, pkgs, helpers, ... }:
|
||||
|
||||
let
|
||||
cfg = config.plugins.firenvim;
|
||||
in
|
||||
{
|
||||
options.plugins.firenvim = {
|
||||
enable = lib.mkEnableOption "Firenvim";
|
||||
package = helpers.mkPackageOption "firenvim" pkgs.vimPlugins.firenvim;
|
||||
extraConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = {};
|
||||
example = {
|
||||
globalSettings = { alt = "all"; };
|
||||
localSettings = {
|
||||
"\".*\"" = {
|
||||
cmdline = "nvim";
|
||||
content = "text";
|
||||
priority = 0;
|
||||
selector = "textarea";
|
||||
takeover = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Extra configuration options for Firenvim.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
globals.firenvim_config = cfg.extraConfig;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user