Releases: BirdeeHub/nixCats-nvim
v6.0.8: moduleNamespace
utils.mkNixosModule
and utils.mkHomeModule
now optionally accept a list of strings as an attribute path to your module options, if you want the module options to be in a different namespace than ${defaultPackageName}.enable = true;
v6.0.7: collate_grammars
collate_grammars setting (#64)
Add collate_grammars setting, default to true, as the default behavior before this feature was introduced was to do this. In fact, more accurately, this release gives you the ability to tell me to NOT collate them.
Collating them results in a significant startup time improvement. Groups all nvim-treesitter grammars into 1 dir on the packpath.
If this update gives you treesitter bugs, its because I stopped deleting all the queries to cover up underlying issues in nixpkgs.
Update your nvim's nixpkgs input, its fixed now thanks to @PerchunPak
If doing the update to the nixpkgs input gives you a build time bug due to a neorg grammar (if you dont know, use --show-trace and scroll up it will say a neorg grammar was the cause about 5-10 traces up the list), remove the neorg overlay until this goes through, or temporarily use my fork with the fix. nvim-neorg/nixpkgs-neorg-overlay#11
v6.0.5: packageDefinitions.packagename = {}:{ extra } and toLua implementation improvements (#63)
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
v6.0.4: metatable magic
Added metatables for nixCats plugin
require('nixCats')(cat) now does the same thing as the nixCats(cat) global
nixCats global now also has the other items from the require('nixCats') module
In fact, the nixCats global is now just _G.nixCats = require('nixCats')
nixCats.settings nixCats.pawsible nixCats.cats nixCats.petShop now can also be called as functions
They take the attrpath as an argument either as a list or a dot separated string, and return vim.tbl_get
of the value
Corresponding updates to the luaUtils template have been made. The old version will still work but wont cover the new values when not on nix, so you will want to pull the luaUtils template again
v6.0.3: extraCats
Possibly breaking, numbers passed from nix to lua will now remain numbers
PR #60
nixCats.utils.catsWithDefault
is being deprecated, due to be removed before 2025.
While being somewhat new, it is being removed due to not interacting well
when merging categoryDefinitions
together.
A new, more capable method of adding default values, and enabling
categories based on other categories, has been added.
The extraCats
section of categoryDefinitions
To create default values, use extraCats section of categoryDefinitions
as outlined in :h nixCats.flake.outputs.categoryDefinitions.default_values,
and demonstrated in the main example template
v5.6.5: Module Consistency
Module consistency (#58)
Breaking:
${defaultPackageName}.packages
module option renamed to ${defaultPackageName}.packageDefinitions.replace
Depreciation warning for the above change added.
Non-Breaking, option additions for consistency:
In addition, the rest of the options to mirror categoryDefinitions
module options have been added
${defaultPackageName}.packageDefinitions.merge
${defaultPackageName}.packageDefinitions.existing
nixos module gained the ability to set nixpkgs version or add overlays per user if desired, so that user options fully mirror system ones.
v5.6.0: modules improved, example config moved.
The example config has been moved from the top level of the repo, which was confusing, to a template.
Instructions on how to run said example config have been updated to match.
Modules have been greatly improved.
The important change is, defining packageDefinitions and categoryDefinitions via module options in separate files will now be correctly merged together. This means you can add categories and plugins to your config from anywhere in your config with much more freedom when using the modules, as you can define them in multiple places more easily.
The second change is: To allow me to move the example config, they needed to be exportable without having a configuration that they are based on.
This is mostly irrelevant for users, outside of the fact that those importing the modules straight from nixCats before, may continue to do so provided they set nixpkgs_version option themselves if they have not already. This is a breaking change if you did not already have this option set, and an error will instruct you on what to change. Add nixpkgs_version = inputs.nixpkgs;
to your module if you have not already done so. For modules based on other configurations, this is not relevant, as it will be able to use the one provided by that configuration. This only matters for the ones output by the nixCats repo itself.
v5.6.1
alternate cat def merge function utils.deepmergeCats
(#55)
This one is capable of merging duplicate lists together. This allows for defining extensions to existing categories, rather than the only option being to completely replace with a new list. Used the same way as utils.mergeCatDefs
In addition, module options for categoryDefininions have been slightly changed.
categoryDefinitions.replace
still uses utils.mergeCatDefs
and merge now uses utils.deepmergeCats
Using categoryDefinitions.replace
option no longer is what controls if definitions from the package the module was based on are inherited.
Instead, an extra option has been added, categoryDefinitions.existing
to allow you to control the merge strategy used for merging with the existing definitions.
Also added :NixCats petShop
to display all the cats you could get!
v5.5.2: utils.catsWithDefault
v5.5.0
What's Changed
Full Changelog: v5.4.7...v5.5.0
- minor deprecations to functions that have had warnings for months now.
:NixCats
debug command now combines all previous :NixCats____
debug commands into 1, and adds more values you can view.
some nixCats.utils functions deprecated due to not outputting values of the right format have finally been removed.
- decided to change luaUtils template
While the old luaUtils templates should still work, you should pull a new luaUtils template by removing lua/nixCatsUtils/init.lua and lua/nixCatsUtils/lazyCat.lua and then running the following command at the root of your nvim config directory, as the new ones are better.
nix flake init -t github:BirdeeHub/nixCats-nvim#luaUtils
The old luaUtils templates will stop working in a few months (with plenty of warning) but pulling the new template now will prevent you from futher breaking changes/deprecations on updating nixCats flake input in the future.
Said upcoming depreciations, coming a few months after I figure out how to inject a warning into the generated table, are to nixCats('nixCats_store_config_location')
which will be renamed to nixCats('nixCats_config_location')
due to not always being in the store, and require('nixCats').pawsible.allPlugins.ts_grammar_plugin
which will be renamed to require('nixCats').pawsible.allPlugins.ts_grammar_path
due to possibly having to be split back up into separate directiories at some point in the future, pending possible changes to nixpkgs (which will be handled internally within nixCats so you dont have to worry about that outside of running nix flake update, but this value would then end up misnamed, which would be bothersome.)
If you use these 2 values anywhere outside of the luaUtils template and are reading this, you should update them now. If you only use them in the luaUtils template, pull a new one! The new one is better anyway.
additional function added to luaUtils template for sourcing after directories of plugins, for those who wish to lazy load things like nvim-cmp sources using either packadd
+autocommands
, or something like lz.n
(or my rendition of it, lze
) to manage calling packadd
and creating autocommands
for you
packages now overrideable via actual override function
You may now call yourpackage.override to override
the values submitted to the builder function. You may do so as many times as you like.
values available to override: (prev will contain these from the previous
call)
luaPath categoryDefinitions packageDefinitions name
nixpkgs system extra_pkg_config dependencyOverlays nixCats_passthru
While you could get the values from the flake before and combine them with new definitions into a new package, this is yet another, possibly cleaner way to do it. (see the template REREREconfigure for info on that)
Useage of override for nixCats is possibly not quite sufficiently documented yet, however it is demonstrated in nix flake init -t github:BirdeeHub/nixCats-nvim#overriding
In addition, modules have been added to package passthrough with defaultPackageName equaling the name of the package it is within.
Now, if you have an existing nixCats package, you are fully guaranteed to be able to reconfigure it, regardless of if they supplied the full set of flake outputs.
More info on overriding at
https://ryantm.github.io/nixpkgs/using/overrides/#sec-pkg-override
https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages
In addition I fixed collision errors that occurred when you name the package nvim, and the collision errors that occur when you try to install nixCats packages with different version of nvim to the same user's path via home.packages or environment.systemPackages
I am very happy about that last thing in particular. You can now actually make packages named nvim