Repository navigation
The second release of nvimx. v0.1.0 could lock a spec and build it; v0.2.0 is about everything that comes after the first lock — resolving version constraints for real, updating one plugin without touching the rest, building the plugins that need a build step, and pointing a plugin at a working tree on your disk.
Highlights
- Version constraints are resolved for real. A
version = "^1.2"is resolved withgit ls-remote --tagsand lazy.nvim's ownlazy.manage.semver, so the semantics match what lazy would have picked.defaults.version— an opts key lazy only applies at git-operation time — is materialized into each eligible plugin at extraction, instead of being lost. nvimx-lock --update [name...]re-resolves everything, or just the plugins you name. Without it, an existing pin is kept while the plugin's identity is unchanged.nvimx-lock --import-lazy-lockmigrates an existinglazy-lock.json, so you keep the revisions lazy.nvim had already pinned for you instead of jumping to whatever is current.- Plugins that need a build step. A shipped build registry builds a plugin from its locked source with a real recipe (blink.cmp's Rust binary among them), and
plugins.overrides/plugins.nixpkgsFallbackare the escape hatches for everything else. A build nvimx cannot run automatically is now warned about at lock time rather than silently skipped. - Local plugin development.
devPlugins+devPathroute a plugin to a working tree on your disk; a spec that writesdev = trueor its owndiris picked up automatically and never gets a flake input. extraLuaPackagesputs luarocks packages onLUA_PATH/LUA_CPATHfor plugins that need them.treesitter.grammarsinstalls grammars from nixpkgs —"all", or a list you name.- Non-GitHub sources are validated at lock time instead of failing later, and a table-form
build = { "make", ":TSUpdate" }now expands to per-step kinds rather than collapsing to one placeholder. - A failing plugin no longer aborts the run: three failure paths that used to kill the whole lock now degrade to a warning.
- stylua + luacheck run as part of
nix fmt, and CI runsnix flake checkandnix fmt -- --ciper system.
Upgrading
No configuration change is required. Your next nvimx-lock run rewrites plugins.json in three ways, all of them cosmetic to the build:
optionalis gone. The field was alwaysnull.- A spec's own
lazy.nvimentry is integrated with the syntheticlazy-nviminput instead of colliding with it. localPluginsrecords only the name. Entries used to carry the directory lazy resolved on the machine that ran the lock — an absolute, often$HOME-bearing path, in a file you commit. Nothing ever read it (devPathdecides where a local plugin loads from), so dropping it changes no resolved directory. Aplugins.jsoncommitted before this release keeps itsdiruntil the next re-lock, and is ignored either way.
One behavior change worth knowing: a plugin whose spec sets dir without dev is now treated as a local plugin, so it gets no flake input. That is what lazy does with it too.
Getting started
inputs.nvimx.url = "github:myuron/nvimx/v0.2.0";Then add nvimx.homeModules.nvimx to your home-manager modules and set programs.nvimx.enable = true; with a lockDir. See the README for the full setup and all module options, and docs/architecture.md for the design.
Before your first switch, lock straight from the flake:
nix run github:myuron/nvimx/v0.2.0#lock -- --config ./nvim --out ./nvim/nvimx-lockComing from lazy.nvim with a lazy-lock.json you want to keep:
nix run github:myuron/nvimx/v0.2.0#lock -- --config ./nvim --out ./nvim/nvimx-lock --import-lazy-lockSystems: x86_64-linux and aarch64-darwin.
Full changelog: v0.1.0...v0.2.0