+
+
+[![LuaRocks][luarocks-shield]][luarocks-url]
+
+> [!WARNING]
+>
+> This module is WIP and does not have a stable release yet.
+
+## :star2: Summary
+
+`rocks-lazy.nvim` is a rocks.nvim module that helps you lazy-load
+your `opt` rocks.nvim plugins.
+
+> [!NOTE]
+>
+> **Should I lazy-load plugins?**
+>
+> It should be a plugin author's responsibility to ensure their plugin doesn't
+> unnecessarily impact startup time, not yours!
+>
+> See [our "DO's and DONT's" guide for plugin developers](https://github.com/nvim-neorocks/nvim-best-practices?tab=readme-ov-file#sleeping_bed-lazy-loading).
+>
+> Regardless, the current status quo is horrible, and some authors may
+> not have the will or capacity to improve their plugins' startup impact.
+>
+> If you find a plugin that takes too long to load,
+> or worse, forces you to load it manually at startup with a
+> call to a heavy `setup` function,
+> consider opening an issue on the plugin's issue tracker.
+
+## :pencil: Requirements
+
+- An up-to-date `rocks.nvim`.
+
+## :hammer: Installation
+
+Simply run `:Rocks install rocks-lazy.nvim`,
+and you are good to go!
+
+## :books: Usage
+
+- [ ] TODO
+
+## :book: License
+
+`rocks-lazy.nvim` is licensed under [GPLv3](./LICENSE).
+
+[luarocks-shield]: https://img.shields.io/luarocks/v/neorocks/rocks-lazy.nvim?logo=lua&color=purple&style=for-the-badge
+[luarocks-url]: https://luarocks.org/modules/neorocks/rocks-lazy.nvim
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..eeebfee
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,503 @@
+{
+ "nodes": {
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_2": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_3": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": "nixpkgs-lib"
+ },
+ "locked": {
+ "lastModified": 1709336216,
+ "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "flake-parts_2": {
+ "inputs": {
+ "nixpkgs-lib": "nixpkgs-lib_2"
+ },
+ "locked": {
+ "lastModified": 1706830856,
+ "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_2": {
+ "inputs": {
+ "systems": "systems_2"
+ },
+ "locked": {
+ "lastModified": 1701680307,
+ "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_3": {
+ "inputs": {
+ "systems": "systems_3"
+ },
+ "locked": {
+ "lastModified": 1701680307,
+ "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_4": {
+ "inputs": {
+ "systems": "systems_4"
+ },
+ "locked": {
+ "lastModified": 1701680307,
+ "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "gen-luarc": {
+ "inputs": {
+ "flake-parts": "flake-parts_2",
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "lastModified": 1708688915,
+ "narHash": "sha256-Vcfbdo2IOEiimRnehGLUM5l2VEIjZYZdKS0sjYWwfb4=",
+ "owner": "mrcjkb",
+ "repo": "nix-gen-luarc-json",
+ "rev": "6eb62734dae84e5f79368dfc545b3fff305df754",
+ "type": "github"
+ },
+ "original": {
+ "owner": "mrcjkb",
+ "repo": "nix-gen-luarc-json",
+ "type": "github"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "neorocks",
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1703887061,
+ "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
+ "gitignore_2": {
+ "inputs": {
+ "nixpkgs": [
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1703887061,
+ "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
+ "neorocks": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "flake-utils": "flake-utils",
+ "neovim-nightly": "neovim-nightly",
+ "nixpkgs": "nixpkgs_2",
+ "pre-commit-hooks": "pre-commit-hooks"
+ },
+ "locked": {
+ "lastModified": 1710393710,
+ "narHash": "sha256-ZbX8liGXk4iWmxTEnyuWFI2LNs+CYoRAelpvnoyt7mc=",
+ "owner": "nvim-neorocks",
+ "repo": "neorocks",
+ "rev": "5f5137a6180b1d52ec522f850a57ae53af9f8677",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nvim-neorocks",
+ "repo": "neorocks",
+ "type": "github"
+ }
+ },
+ "neovim-nightly": {
+ "inputs": {
+ "flake-utils": "flake-utils_2",
+ "nixpkgs": [
+ "neorocks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "dir": "contrib",
+ "lastModified": 1710391217,
+ "narHash": "sha256-Wm0SSQ6HJY1IUGkhFgD0LtJGw6lppxMuKgLI94Dr1yk=",
+ "owner": "neovim",
+ "repo": "neovim",
+ "rev": "3502aa63f0f4ea8d8982aea81a819424e71029bc",
+ "type": "github"
+ },
+ "original": {
+ "dir": "contrib",
+ "owner": "neovim",
+ "repo": "neovim",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1708475490,
+ "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "0e74ca98a74bc7270d28838369593635a5db3260",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-lib": {
+ "locked": {
+ "dir": "lib",
+ "lastModified": 1709237383,
+ "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
+ "type": "github"
+ },
+ "original": {
+ "dir": "lib",
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-lib_2": {
+ "locked": {
+ "dir": "lib",
+ "lastModified": 1706550542,
+ "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
+ "type": "github"
+ },
+ "original": {
+ "dir": "lib",
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1704874635,
+ "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-23.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-stable_2": {
+ "locked": {
+ "lastModified": 1704874635,
+ "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-23.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1710346304,
+ "narHash": "sha256-vwoyBoCovK7+vdbCYqL9MssoFQjaXtZN8sElcjUdbx8=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "a0906f14161a5c5792e9883117b9471f5bf6df72",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1710420109,
+ "narHash": "sha256-UkHXDP357wXlols1mGnoI2zzuy9Sv7YvD3/gq/CZ6mM=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "5c43596de143e0403a1821e2ee9d041c5cf017e5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "pre-commit-hooks": {
+ "inputs": {
+ "flake-compat": "flake-compat_2",
+ "flake-utils": "flake-utils_3",
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "neorocks",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable"
+ },
+ "locked": {
+ "lastModified": 1708018599,
+ "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
+ "pre-commit-hooks_2": {
+ "inputs": {
+ "flake-compat": "flake-compat_3",
+ "flake-utils": "flake-utils_4",
+ "gitignore": "gitignore_2",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable_2"
+ },
+ "locked": {
+ "lastModified": 1708018599,
+ "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-parts": "flake-parts",
+ "gen-luarc": "gen-luarc",
+ "neorocks": "neorocks",
+ "nixpkgs": "nixpkgs_3",
+ "pre-commit-hooks": "pre-commit-hooks_2"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_2": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_4": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..d02d310
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,120 @@
+{
+ description = "A rocks.nvim module that helps you manage tree-sitter parsers";
+
+ nixConfig = {
+ extra-substituters = "https://neorocks.cachix.org";
+ extra-trusted-public-keys = "neorocks.cachix.org-1:WqMESxmVTOJX7qoBC54TwrMMoVI1xAM+7yFin8NRfwk=";
+ };
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs";
+
+ neorocks.url = "github:nvim-neorocks/neorocks";
+
+ gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
+
+ flake-parts.url = "github:hercules-ci/flake-parts";
+
+ pre-commit-hooks = {
+ url = "github:cachix/pre-commit-hooks.nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ outputs = inputs @ {
+ self,
+ nixpkgs,
+ neorocks,
+ gen-luarc,
+ flake-parts,
+ pre-commit-hooks,
+ ...
+ }:
+ flake-parts.lib.mkFlake {inherit inputs;} {
+ systems = [
+ "x86_64-linux"
+ "x86_64-darwin"
+ "aarch64-darwin"
+ ];
+ perSystem = {
+ config,
+ self',
+ inputs',
+ system,
+ ...
+ }: let
+ pkgs = import nixpkgs {
+ inherit system;
+ overlays = [
+ self.overlays.default
+ neorocks.overlays.default
+ gen-luarc.overlays.default
+ ];
+ };
+
+ luarc = pkgs.mk-luarc {
+ nvim = pkgs.neovim-nightly;
+ neodev-types = "nightly";
+ plugins = with pkgs.lua51Packages; [
+ rocks-nvim
+ ];
+ };
+
+ type-check-nightly = pre-commit-hooks.lib.${system}.run {
+ src = self;
+ hooks = {
+ lua-ls.enable = true;
+ };
+ settings = {
+ lua-ls.config = luarc;
+ };
+ };
+
+ pre-commit-check = pre-commit-hooks.lib.${system}.run {
+ src = self;
+ hooks = {
+ alejandra.enable = true;
+ stylua.enable = true;
+ luacheck.enable = true;
+ editorconfig-checker.enable = true;
+ };
+ };
+
+ devShell = pkgs.mkShell {
+ name = "rocks-lazy.nvim devShell";
+ shellHook = ''
+ ${pre-commit-check.shellHook}
+ ln -fs ${pkgs.luarc-to-json luarc} .luarc.json
+ '';
+ buildInputs = with pre-commit-hooks.packages.${system};
+ [
+ alejandra
+ lua-language-server
+ stylua
+ luacheck
+ editorconfig-checker
+ ]
+ ++ (with pkgs; [
+ (lua5_1.withPackages (ps: with ps; [luarocks dkjson]))
+ ]);
+ };
+ in {
+ packages.default = pkgs.lua51Packages.rocks-lazy-nvim;
+
+ devShells = {
+ default = devShell;
+ inherit devShell;
+ };
+
+ checks = {
+ inherit
+ pre-commit-check
+ type-check-nightly
+ ;
+ };
+ };
+ flake = {
+ overlays.default = import ./nix/overlay.nix {inherit self;};
+ };
+ };
+}
diff --git a/nix/overlay.nix b/nix/overlay.nix
new file mode 100644
index 0000000..e90063b
--- /dev/null
+++ b/nix/overlay.nix
@@ -0,0 +1,45 @@
+{self}: final: prev: let
+ name = "rocks-lazy.nvim";
+
+ luaPackage-override = luaself: luaprev: {
+ rocks-lazy-nvim = luaself.callPackage ({
+ luaOlder,
+ buildLuarocksPackage,
+ lua,
+ rocks-nvim,
+ lz-n,
+ }:
+ buildLuarocksPackage {
+ pname = name;
+ version = "scm-1";
+ knownRockspec = "${self}/rocks-lazy.nvim-scm-1.rockspec";
+ src = self;
+ disabled = luaOlder "5.1";
+ propagatedBuildInputs = [
+ rocks-nvim
+ lz-n
+ ];
+ }) {};
+ };
+ lua5_1 = prev.lua5_1.override {
+ packageOverrides = luaPackage-override;
+ };
+ lua51Packages = final.lua5_1.pkgs;
+in {
+ inherit
+ lua5_1
+ lua51Packages
+ ;
+
+ vimPlugins =
+ prev.vimPlugins
+ // {
+ rocks-git-nvim = final.neovimUtils.buildNeovimPlugin {
+ pname = name;
+ version = "dev";
+ src = self;
+ };
+ };
+
+ rocks-lazy-nvim = lua51Packages.rocks-lazy-nvim;
+}
diff --git a/plugin/rocks-lazy.lua b/plugin/rocks-lazy.lua
new file mode 100644
index 0000000..7b10ec4
--- /dev/null
+++ b/plugin/rocks-lazy.lua
@@ -0,0 +1,5 @@
+if vim.g.did_load_rocks_lazy then
+ return
+end
+
+vim.g.did_load_rocks_lazy = true
diff --git a/rocks-header.svg b/rocks-header.svg
new file mode 100644
index 0000000..7ba5948
--- /dev/null
+++ b/rocks-header.svg
@@ -0,0 +1,1030 @@
+
+