lib/modules: add applyExtraConfig

Used for
- mkVimPlugin: extraConfig
- mkNeovimPlugin: extraConfig
- mkLsp: extraConfig
- mkLsp: settings
- mkExtension (telecsope): extraConfig
This commit is contained in:
Matt Sturgeon 2024-11-19 13:55:33 +00:00
parent c7b7b6481b
commit 63cfc84abe
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
6 changed files with 69 additions and 14 deletions

View file

@ -65,7 +65,7 @@ A template plugin can be found in (plugins/TEMPLATE.nix)[https://github.com/nix-
| **configLocation** | The location for the Lua configuration. | No | `"extraConfigLuaPre"` if `isColorscheme` then `extraConfigLuaPre`, otherwise `"extraConfigLua"` |
| **deprecateExtraOptions** | Indicating whether to deprecate the `extraOptions` attribute. Mainly used for old plugins. | No | `false` |
| **description** | A brief description of the plugin. Can also be used for non-normative documentation, warnings, tips and tricks. | No | `null` |
| **extraConfig** | Additional configuration for the plugin. | No | `{}` |
| **extraConfig** | Additional configuration for the plugin. Either an attrset, a function accepting `cfg`, or a function accepting `cfg` and `opts`. | No | `{}` |
| **extraOptions** | Module options for the plugin, to be added _outside_ of the `settings` option. These should be Nixvim-specific options. | No | `{}` |
| **extraPackages** | Extra packages to include. | No | `[]` |
| **extraPlugins** | Extra plugins to include. | No | `[]` |
@ -126,7 +126,7 @@ Such plugins are usually configured via vim globals, but often have no configura
| **colorscheme** | The name of the colorscheme. | No | `name` parameter |
| **deprecateExtraConfig** | Flag to deprecate extra configuration. | No | `false` |
| **description** | A description of the plugin. Can also be used for non-normative documentation, warnings, tips and tricks. | No | `null` |
| **extraConfig** | Extra configuration for the plugin. | No | `cfg: {}` |
| **extraConfig** | Extra configuration for the plugin. Either an attrset, a function accepting `cfg`, or a function accepting `cfg` and `opts`. | No | `{}` |
| **extraOptions** | Extra options for the plugin. | No | `{}` |
| **extraPackages** | Extra packages to include. | No | `[]` |
| **extraPlugins** | Extra plugins to include. | No | `[]` |