mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 11:14:36 +02:00
lib/modules: add applyExtraConfig
Used for - mkVimPlugin: extraConfig - mkNeovimPlugin: extraConfig - mkLsp: extraConfig - mkLsp: settings - mkExtension (telecsope): extraConfig
This commit is contained in:
parent
c7b7b6481b
commit
63cfc84abe
6 changed files with 69 additions and 14 deletions
|
@ -63,7 +63,7 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.${namespace}.${name};
|
||||
opt = options.${namespace}.${name};
|
||||
opts = options.${namespace}.${name};
|
||||
|
||||
setupCode = ''
|
||||
require('${luaName}')${setup}(${
|
||||
|
@ -78,7 +78,7 @@
|
|||
inherit maintainers;
|
||||
nixvimInfo = {
|
||||
inherit description;
|
||||
url = args.url or opt.package.default.meta.homepage;
|
||||
url = args.url or opts.package.default.meta.homepage;
|
||||
path = [
|
||||
namespace
|
||||
name
|
||||
|
@ -146,7 +146,11 @@
|
|||
(lib.optionalAttrs (isColorscheme && (colorscheme != null)) {
|
||||
colorscheme = lib.mkDefault colorscheme;
|
||||
})
|
||||
(extraConfig cfg)
|
||||
(lib.optionalAttrs (args ? extraConfig) (
|
||||
lib.nixvim.modules.applyExtraConfig {
|
||||
inherit extraConfig cfg opts;
|
||||
}
|
||||
))
|
||||
]
|
||||
++ (lib.optionals (!hasConfigAttrs) [
|
||||
(lib.optionalAttrs callSetup (setLuaConfig setupCode))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue