mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +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
|
||||
basePluginPath = [namespace name];
|
||||
settingsPath = basePluginPath ++ ["settings"];
|
||||
in
|
||||
imports
|
||||
++ (
|
||||
|
@ -70,16 +71,23 @@ with lib; rec {
|
|||
(
|
||||
mkRenamedOptionModule
|
||||
(basePluginPath ++ ["extraOptions"])
|
||||
(basePluginPath ++ ["settings"])
|
||||
settingsPath
|
||||
)
|
||||
)
|
||||
++ (
|
||||
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
|
||||
(basePluginPath ++ [optionName])
|
||||
(basePluginPath ++ ["settings" (nixvimUtils.toSnakeCase optionName)])
|
||||
(basePluginPath ++ optionPath)
|
||||
(settingsPath ++ optionPathSnakeCase)
|
||||
)
|
||||
optionsRenamedToSettings
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue