mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 01:04:34 +02:00
plugins/neorg: use neorgTelescopePackage option
This commit is contained in:
parent
7a9bb2ee95
commit
e3e3774177
2 changed files with 25 additions and 3 deletions
|
@ -20,6 +20,11 @@ with lib;
|
|||
];
|
||||
};
|
||||
|
||||
neorgTelescopePackage = lib.mkPackageOption pkgs [
|
||||
"vimPlugins"
|
||||
"neorg-telescope"
|
||||
] { nullable = true; };
|
||||
|
||||
lazyLoading = helpers.defaultNullOpts.mkBool false '''';
|
||||
|
||||
logger =
|
||||
|
@ -148,12 +153,18 @@ with lib;
|
|||
Telescope support for neorg (`core.integrations.telescope`) is enabled but the
|
||||
telescope plugin is not.
|
||||
'')
|
||||
++ (optional (telescopeSupport && (cfg.neorgTelescopePackage == null)) ''
|
||||
Telescope support for neorg (`core.integrations.telescope`) is enabled but the
|
||||
`neorgTelescopePackage` package is not set.
|
||||
'')
|
||||
++ (optional ((hasAttr "core.defaults" cfg.modules) && (!config.plugins.treesitter.enable)) ''
|
||||
Neorg's `core.defaults` module is enabled but `plugins.treesitter` is not.
|
||||
Treesitter is required when using the `core.defaults`.
|
||||
'');
|
||||
|
||||
extraPlugins = [ cfg.package ] ++ (optional telescopeSupport pkgs.vimPlugins.neorg-telescope);
|
||||
extraPlugins = [
|
||||
cfg.package
|
||||
] ++ (optional (telescopeSupport && cfg.neorgTelescopePackage != null) cfg.neorgTelescopePackage);
|
||||
|
||||
extraConfigLua = ''
|
||||
require('neorg').setup(${helpers.toLuaObject setupOptions})
|
||||
|
|
|
@ -75,13 +75,24 @@
|
|||
};
|
||||
|
||||
telescope-integration = {
|
||||
# TODO: re-enable when this will have been fixed upstream.
|
||||
test.runNvim = false;
|
||||
plugins = {
|
||||
telescope.enable = false;
|
||||
telescope.enable = true;
|
||||
|
||||
neorg = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
modules."core.integrations.telescope".__empty = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
no-packages = {
|
||||
# TODO: re-enable when this will have been fixed upstream.
|
||||
test.runNvim = false;
|
||||
plugins.neorg = {
|
||||
enable = true;
|
||||
neorgTelescopePackage = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue