mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 10:18:36 +02:00
helpers/neovim-plugin/mkNeovimPlugin: allow lists in optionsRenamedToSettings
This commit is contained in:
parent
d6a66851fe
commit
9d4d529ee7
1 changed files with 12 additions and 4 deletions
|
@ -62,6 +62,7 @@ with lib; rec {
|
||||||
|
|
||||||
imports = let
|
imports = let
|
||||||
basePluginPath = [namespace name];
|
basePluginPath = [namespace name];
|
||||||
|
settingsPath = basePluginPath ++ ["settings"];
|
||||||
in
|
in
|
||||||
imports
|
imports
|
||||||
++ (
|
++ (
|
||||||
|
@ -70,16 +71,23 @@ with lib; rec {
|
||||||
(
|
(
|
||||||
mkRenamedOptionModule
|
mkRenamedOptionModule
|
||||||
(basePluginPath ++ ["extraOptions"])
|
(basePluginPath ++ ["extraOptions"])
|
||||||
(basePluginPath ++ ["settings"])
|
settingsPath
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
++ (
|
++ (
|
||||||
map
|
map
|
||||||
(
|
(
|
||||||
optionName:
|
option: let
|
||||||
|
optionPath =
|
||||||
|
if isString option
|
||||||
|
then [option]
|
||||||
|
else option; # option is already a path (i.e. a list)
|
||||||
|
|
||||||
|
optionPathSnakeCase = map nixvimUtils.toSnakeCase optionPath;
|
||||||
|
in
|
||||||
mkRenamedOptionModule
|
mkRenamedOptionModule
|
||||||
(basePluginPath ++ [optionName])
|
(basePluginPath ++ optionPath)
|
||||||
(basePluginPath ++ ["settings" (nixvimUtils.toSnakeCase optionName)])
|
(settingsPath ++ optionPathSnakeCase)
|
||||||
)
|
)
|
||||||
optionsRenamedToSettings
|
optionsRenamedToSettings
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue