mirror of
https://github.com/nix-community/nixvim.git
synced 2026-10-05 21:36:41 -04:00
Added extra options (#62)
* Added extraOptions helper * project-nvim: added extraOptions
This commit is contained in:
@@ -106,6 +106,17 @@ rec {
|
||||
inherit value global;
|
||||
};
|
||||
|
||||
extraOptionsOptions = {
|
||||
extraOptions = mkOption {
|
||||
default = { };
|
||||
type = types.attrs;
|
||||
description = ''
|
||||
These attributes will be added to the table parameter for the setup function.
|
||||
(Can override other attributes set by nixvim)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
mkRaw = r: { __raw = r; };
|
||||
|
||||
wrapDo = string: ''
|
||||
|
||||
@@ -5,7 +5,7 @@ let
|
||||
helpers = import ../helpers.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
options.plugins.project-nvim = {
|
||||
options.plugins.project-nvim = helpers.extraOptionsOptions // {
|
||||
enable = mkEnableOption "Enable project.nvim";
|
||||
|
||||
manualMode = mkOption {
|
||||
@@ -52,6 +52,7 @@ in
|
||||
type = types.nullOr (types.either types.str helpers.rawType);
|
||||
default = null;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config =
|
||||
@@ -66,7 +67,7 @@ in
|
||||
silent_chdir = cfg.silentChdir;
|
||||
scope_schdir = cfg.scopeChdir;
|
||||
data_path = cfg.dataPath;
|
||||
};
|
||||
} // cfg.extraOptions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [ pkgs.vimPlugins.project-nvim ];
|
||||
|
||||
Reference in New Issue
Block a user