Skip to content

v6.0.5: packageDefinitions.packagename = {}:{ extra } and toLua implementation improvements (#63)

Compare
Choose a tag to compare
@BirdeeHub BirdeeHub released this 15 Nov 05:13
· 101 commits to main since this release
3714989

having everyone put all the values in categories and use the category fetcher for values is probably confusing.

Now it all still works the same way, I just added an optional extra set to packageDefinitions named extra that also gets added to the plugin.

categoryDefinitions = { pkgs, settings, categories, extra, name, ... }@pkgDef: {
};
packageDefinitions = {
  packagename = { pkgs, ... }: {
    settings = {};
    categories = {};
    extra = {};
  };
};

Like the other tables, you can use nixCats.extra("path.to.val") as an alias for fetching with vim.tbl_get to protect against nil table access errors, which is different from how the main nixCats('path.to.cat') works in that, if it does not find the value, it will always return nil, rather than returning an indicator of whether it was enabled or not. You can also use :NixCats extra to view the table

utils.mkLuaInline has been renamed to utils.n2l.types.inline-safe.mk

Extra utils.n2l functions added documented at :help nixCats.flake.outputs.utils.n2l