mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-29 20:04:28 +02:00
lib/neovim-plugin: freeform lazy settings
Instead of trying to manage upstream configuration options, just keep using our freeform options so we can do less finicky logic and workarounds.
This commit is contained in:
parent
d24dd313cf
commit
0997b371c7
3 changed files with 103 additions and 118 deletions
|
@ -178,20 +178,14 @@
|
|||
(
|
||||
{
|
||||
__unkeyed-1 = originalName;
|
||||
# Use provided after, otherwise fallback to normal lua content
|
||||
# Use provided after, otherwise fallback to normal function wrapped lua content
|
||||
after =
|
||||
if cfg.lazyLoad.settings.after != null then
|
||||
cfg.lazyLoad.settings.after
|
||||
else
|
||||
# We need to wrap it in a function so it doesn't execute immediately
|
||||
"function()\n " + cfg.luaConfig.content + " \nend";
|
||||
colorscheme =
|
||||
if cfg.lazyLoad.settings.colorscheme != null then
|
||||
cfg.lazyLoad.settings.colorscheme
|
||||
else if (isColorscheme && colorscheme != null) then
|
||||
colorscheme
|
||||
else
|
||||
null;
|
||||
let
|
||||
after = cfg.lazyLoad.settings.after or null;
|
||||
default = "function()\n " + cfg.luaConfig.content + " \nend";
|
||||
in
|
||||
if (lib.isString after || lib.types.rawLua.check after) then after else default;
|
||||
colorscheme = lib.mkIf isColorscheme (cfg.lazyLoad.settings.colorscheme or colorscheme);
|
||||
}
|
||||
// lib.removeAttrs cfg.lazyLoad.settings [
|
||||
"after"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue