Releases: BirdeeHub/nixCats-nvim
mkNixosModules and mkHomeModules: all args now optional
No behavior changes, if defaultPackageName is passed, the
moduleNamespace will still be [ defaultPackageName ]
But if you don't pass either defaultPackageName or moduleNamespace,
the moduleNamespace will be [ "nixCats" ]
This ensures there are no behavior changes to previously valid useage,
only the ability to pass no arguments at all
to mkNixosModules or mkHomeModules has been added.
Added the moduleNamespace argument to the call to mkNixosModules and mkHomeModules
in the templates to aid in clarity for new users.
Also improved formatting of the generated utils docs
v6.2.7: removal of a function from luaUtils
require('nixCatsUtils.lzUtils').make_load_with_after
removed in favor of pkgs.vimPlugins.lzextras
(NEW, make sure to update nixpkgs-unstable input, or import it via flake inputs)
require('lzextras').make_load_with_afters
Because templates are a bad distribution method, especially when they are in templates of projects that are not technically related.
feel free to keep the function if you already have it, there's nothing wrong with it as it was. (removing it from the template here doesnt remove it from your config)
Example template also changed to use the new plugin for lsps. Feel free to ignore that if you are happy with the way you are doing lsps currently.
Some very minor refactors to the builder directory were made, none of which change anything about how anything works, although one did slightly fix the indentation of your generated nixCats plugin in the store
v6.2.6: luaUtils fixes and qol
If you started in the last 2-3 weeks and your config contains the optional require('nixCatsUtils.catPacker')
file, your template contains a serious regression due to a strange git mistake. This only affects when you try to run the configuration without nix being involved, which is also why it went uncaught.
It uses the wrong plugin. You may wish to re initialize the template by deleting the offending file, and running nix flake init -t github:BirdeeHub/nixCats-nvim#luaUtils
from the top level of your config, or simply copy paste the new contents into the file, so that you can use the intended paq-nvim as it works somewhat better, and the example configuration has a file that expects the paq-nvim syntax in myLuaConf
This is the intended version you should have https://github.com/BirdeeHub/nixCats-nvim/blob/main/templates/luaUtils/lua/nixCatsUtils/catPacker.lua
Apologies for any confusion this may have caused!
I also improved the behavior of go to file and similar commands within the :NixCats debug command's popup window, and changed the nix store filename scheme of the packages slightly to better improve clarity of multi-nvim stacktraces
v6.2.5: plugin specs improvements and other updates
A possibly breaking fix
FIX: extra init.vim in the root directory no longer ran if init.lua exists
from the neovim manual:
A file containing initialization commands is generically called
a "vimrc" or config file. It can be either Vimscript ("init.vim") or
Lua ("init.lua"), but not both. E5422
See also vimrc-intro and base-directories.
Experimentation says init.lua wins. So init.lua should win here too.
I thought I was being cool by allowing both but it has been bugging me for a while that it is not the same. So now it is.
The fix also has the side effect of removing a filesystem call, thus making the startup time faster.
This has been a valid thing you could do in the plugins section.
Now you can include pre = true to run before init.lua and you can optionally include a priority to order the generated config (default 150, lower is earlier)
categoryname = [
{ plugin = derivation; config = { lua = ""; vim = ""; }; pre = true; priority = 150;}
{ plugin = derivation; config = ""; type = "<viml or lua>"; pre = false; priority = 150;}
];
see more info at :h nixCats.flake.outputs.categoryDefinitions.schemas
It affects only the order of the config provided in the config variable, the plugins are all installed before nvim runs
You probably will never need to use this, but you can copy paste definitions straight from home manager so that is cool
I also gave the :NixCats
debug user command a popup window rather than just calling print directly, because some plugins make print()
an insufficient display method. This obviously is only a debug command for the user to run to see things on occasion, and does not have performance implications. As a bonus, it is now way easier to copy paste it.
If you want to return to the old print()
behavior, simply set vim.g.nixcats_debug_ui = false
anywhere in your lua.
Currently no plans exist for changes until neovim changes the way hosting programs work. Fixing that will require no breaking changes, but possibly will allow some new features in the form of new settings or sections in categoryDefinitions, and improve build times slightly due to no longer needing to literally run nvim inside the wrapper derivation in order to generate an rplugin.vim file
I also plan to update the optional nixCatsUtils.catPacker template file to use the builtin plugin manager when they release that instead of paq.nvim. But that file is almost aggressively simple, and without the paq.nvim bootstrapping is basically just an if statement, so honestly I might just delete it at that point. Doing that wont change anyone's existing configuration, as it is in a template which people initialize directly into their configuration.
Feel free to make PRs and issues, I will write more tests, I might do more stuff with docs and templates, but I am fairly happy with its current feature set.
I am committed to making sure it is as good and freely editable as possible. If something is being done inside nixCats in such a way that it cannot be changed, and you want to get to it and/or customize its behavior, it can be easily exposed as a setting, or even a new section in categoryDefinitions. So please let me know! But there is very little that cannot be changed by the user already.
v6.1.0: utils.mergeDefs
utils.mergeDefs
This is the general form of the two previously existing merge functions.
v6.0.9: config.nixCats.utils
Added utils set as a read only option so that module users can access it from somewhere other than their inputs if desired.
Also some minor bugfixes have been made, and the documentation has been improved somewhat
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