From 7888babb3f79f6d5c786e9b7bd7f45f95d264113 Mon Sep 17 00:00:00 2001 From: Jordan Isaacs Date: Fri, 28 Jul 2023 14:42:02 -0700 Subject: [PATCH] Flake: make plugins autodiscoverable --- CONTRIBUTING.md | 2 +- docs/release-notes/rl-0.1.adoc | 2 + flake.lock | 745 +++++++++++++++++---------------- flake.nix | 268 +++++------- modules/lib/plugins.nix | 8 +- 5 files changed, 504 insertions(+), 521 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87be4c7..c976d39 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ All documentation is done with [asciidoc](https://asciidoc.org/). The following Updating or adding plugins should reference the [update tracking issue](https://github.com/jordanisaacs/neovim-flake/issues/33) in the commit message. This is so the issue can serve as a quick feed of plugin update history. Add `#33` to the commit. -All new vim plugins should be specified as inputs to the flake, please do not use nixpkgs. Keeping the plugins pinned lets us painlessly update nixpkgs. +All new vim plugins should be specified as inputs to the flake, please do not use nixpkgs. Keeping the plugins pinned lets us painlessly update nixpkgs. The inputs should be prefixed with `plugin-` to allow the flake to automatically make them usable to the module system. ## Style diff --git a/docs/release-notes/rl-0.1.adoc b/docs/release-notes/rl-0.1.adoc index 4cc9dce..aad2ebb 100644 --- a/docs/release-notes/rl-0.1.adoc +++ b/docs/release-notes/rl-0.1.adoc @@ -55,6 +55,8 @@ vim.luaConfigRC = lib.nvim.dag.entryAnywhere "config here" * Added support for `statix` and `deadnix` through <> +* Plugin inputs are now prefixed with `plugin-` to allow autodiscovery of them + https://github.com/MoritzBoehme[MoritzBoehme]: * `catppuccin` theme is now available as a neovim theme <> and lualine theme <>. diff --git a/flake.lock b/flake.lock index 818cbad..5bc256e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,131 @@ { "nodes": { - "bufdelete-nvim": { + "dirt-samples-src": { + "flake": false, + "locked": { + "lastModified": 1588278411, + "narHash": "sha256-h8vQxRym6QzNLOTZU7A43VCHuG0H77l+BFwXnC0L1CE=", + "owner": "tidalcycles", + "repo": "dirt-samples", + "rev": "66d432418c9a7d82cf049d9246adfa62f46df2a6", + "type": "github" + }, + "original": { + "owner": "tidalcycles", + "ref": "master", + "repo": "dirt-samples", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": [ + "rnix-lsp", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1655042882, + "narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", + "owner": "nix-community", + "repo": "naersk", + "rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nil": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1690509298, + "narHash": "sha256-2QaWrYIXvip9Ii64AplrkEmKuPt3rnQHq74Scg5dXxk=", + "owner": "jordanisaacs", + "repo": "nil", + "rev": "a2668f5680c48d6ed14f4de7afbbd5f54810f76e", + "type": "github" + }, + "original": { + "owner": "jordanisaacs", + "repo": "nil", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1690441914, + "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "db8672b8d0a2593c2405aed0c1dfa64b2a2f428f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1655400192, + "narHash": "sha256-49OBVVRgb9H/PSmNT9W61+NRdDbuSJVuDDflwXlaUKU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3d7435c638baffaa826b85459df0fff47f12317d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nmd": { + "flake": false, + "locked": { + "lastModified": 1679684072, + "narHash": "sha256-+DYYk9/Ns+njngvkHcmHX9HkALBRulLUIXLm1L44emM=", + "owner": "rycee", + "repo": "nmd", + "rev": "f5a18594255866342ace46827c390c36875337e5", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmd", + "type": "gitlab" + } + }, + "plugin-bufdelete-nvim": { "flake": false, "locked": { "lastModified": 1688027130, @@ -16,7 +141,7 @@ "type": "github" } }, - "catppuccin": { + "plugin-catppuccin": { "flake": false, "locked": { "lastModified": 1690345108, @@ -32,7 +157,7 @@ "type": "github" } }, - "cmp-buffer": { + "plugin-cmp-buffer": { "flake": false, "locked": { "lastModified": 1660101488, @@ -48,7 +173,7 @@ "type": "github" } }, - "cmp-nvim-lsp": { + "plugin-cmp-nvim-lsp": { "flake": false, "locked": { "lastModified": 1687494203, @@ -64,7 +189,7 @@ "type": "github" } }, - "cmp-path": { + "plugin-cmp-path": { "flake": false, "locked": { "lastModified": 1664784283, @@ -80,7 +205,7 @@ "type": "github" } }, - "cmp-treesitter": { + "plugin-cmp-treesitter": { "flake": false, "locked": { "lastModified": 1680745848, @@ -96,7 +221,7 @@ "type": "github" } }, - "cmp-vsnip": { + "plugin-cmp-vsnip": { "flake": false, "locked": { "lastModified": 1669100283, @@ -112,7 +237,7 @@ "type": "github" } }, - "crates-nvim": { + "plugin-crates-nvim": { "flake": false, "locked": { "lastModified": 1688295570, @@ -128,24 +253,7 @@ "type": "github" } }, - "dirt-samples-src": { - "flake": false, - "locked": { - "lastModified": 1588278411, - "narHash": "sha256-h8vQxRym6QzNLOTZU7A43VCHuG0H77l+BFwXnC0L1CE=", - "owner": "tidalcycles", - "repo": "dirt-samples", - "rev": "66d432418c9a7d82cf049d9246adfa62f46df2a6", - "type": "github" - }, - "original": { - "owner": "tidalcycles", - "ref": "master", - "repo": "dirt-samples", - "type": "github" - } - }, - "dracula": { + "plugin-dracula": { "flake": false, "locked": { "lastModified": 1687207996, @@ -161,7 +269,7 @@ "type": "github" } }, - "dracula-nvim": { + "plugin-dracula-nvim": { "flake": false, "locked": { "lastModified": 1689529500, @@ -177,14 +285,14 @@ "type": "github" } }, - "fidget": { + "plugin-fidget": { "flake": false, "locked": { - "lastModified": 1679938700, - "narHash": "sha256-rmJgfrEr/PYBq0S7j3tzRZvxi7PMMaAo0k528miXOQc=", + "lastModified": 1689723284, + "narHash": "sha256-gmpRk1b/fpNRPUPBA9UnYbmiGRoW5otzW9Nfcfvju74=", "owner": "j-hui", "repo": "fidget.nvim", - "rev": "0ba1e16d07627532b6cae915cc992ecac249fb97", + "rev": "89b633f3bd0b7187f070236b348697de176860e2", "type": "github" }, "original": { @@ -193,22 +301,7 @@ "type": "github" } }, - "flake-utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitsigns-nvim": { + "plugin-gitsigns-nvim": { "flake": false, "locked": { "lastModified": 1690463120, @@ -224,14 +317,14 @@ "type": "github" } }, - "glow-nvim": { + "plugin-glow-nvim": { "flake": false, "locked": { - "lastModified": 1690503777, - "narHash": "sha256-JU1nSRAgweiUeW5/r1/gGbMrKUOAOJD+8w9RxDDP6uk=", + "lastModified": 1690579324, + "narHash": "sha256-+wNjcjLHO9kjfnVOhJ9uawwJ3EoQuvz3bz6wqHuO8vo=", "owner": "ellisonleao", "repo": "glow.nvim", - "rev": "0bd87753b052205d271a790b48a09882a9e79f35", + "rev": "5ebffc63db08ea066167f195c4e3f341a331d3eb", "type": "github" }, "original": { @@ -240,7 +333,7 @@ "type": "github" } }, - "gruvbox": { + "plugin-gruvbox": { "flake": false, "locked": { "lastModified": 1682256511, @@ -256,7 +349,7 @@ "type": "github" } }, - "indent-blankline": { + "plugin-indent-blankline": { "flake": false, "locked": { "lastModified": 1688727830, @@ -272,14 +365,14 @@ "type": "github" } }, - "kommentary": { + "plugin-kommentary": { "flake": false, "locked": { - "lastModified": 1644888740, - "narHash": "sha256-6YNKYMxaKi02TLa+ebt97XGREnmTjdJAA3bSHFC4yX0=", + "lastModified": 1672983049, + "narHash": "sha256-N4n5tjNB1yX/QxH+t5aG0VxNwZhUJejv0b5V62WEKDU=", "owner": "b3nj5m1n", "repo": "kommentary", - "rev": "12ecde4ed3ecb39964000a5fd034ae4c1d307388", + "rev": "3a80117148c6798972bb69414423311ab151d368", "type": "github" }, "original": { @@ -288,14 +381,14 @@ "type": "github" } }, - "lsp-signature": { + "plugin-lsp-signature": { "flake": false, "locked": { - "lastModified": 1651382786, - "narHash": "sha256-owtDWZXZZH6z0m5oHfm/QUjRoWKH4LY6UUOZq8JPckI=", + "lastModified": 1690267930, + "narHash": "sha256-qvcs0KuO2/NdtiTZIxJ2vrwV0I5PjzjMvoAePPasaJM=", "owner": "ray-x", "repo": "lsp_signature.nvim", - "rev": "6d160406f948a810c40304224a1255c8bba5a415", + "rev": "58d4e810801da74c29313da86075d6aea537501f", "type": "github" }, "original": { @@ -304,7 +397,7 @@ "type": "github" } }, - "lspkind": { + "plugin-lspkind": { "flake": false, "locked": { "lastModified": 1683275543, @@ -320,14 +413,14 @@ "type": "github" } }, - "lspsaga": { + "plugin-lspsaga": { "flake": false, "locked": { - "lastModified": 1647219889, - "narHash": "sha256-utb2Rp6RdYWZzVt4W7B7RHOk4Xq1Lli4RcHxZLa8dHc=", + "lastModified": 1670360222, + "narHash": "sha256-7ENInq3LAPPTdm0Fb7klOc630j8m4LRj1kLZZFYLh68=", "owner": "tami5", "repo": "lspsaga.nvim", - "rev": "5309d75bd90ce5b1708331df3af1e971fa83a2b9", + "rev": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81", "type": "github" }, "original": { @@ -336,7 +429,7 @@ "type": "github" } }, - "lualine": { + "plugin-lualine": { "flake": false, "locked": { "lastModified": 1683213422, @@ -352,100 +445,7 @@ "type": "github" } }, - "naersk": { - "inputs": { - "nixpkgs": [ - "rnix-lsp", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1655042882, - "narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", - "owner": "nix-community", - "repo": "naersk", - "rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, - "nil": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1690509298, - "narHash": "sha256-2QaWrYIXvip9Ii64AplrkEmKuPt3rnQHq74Scg5dXxk=", - "owner": "jordanisaacs", - "repo": "nil", - "rev": "a2668f5680c48d6ed14f4de7afbbd5f54810f76e", - "type": "github" - }, - "original": { - "owner": "jordanisaacs", - "repo": "nil", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1690441914, - "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "db8672b8d0a2593c2405aed0c1dfa64b2a2f428f", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1655400192, - "narHash": "sha256-49OBVVRgb9H/PSmNT9W61+NRdDbuSJVuDDflwXlaUKU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3d7435c638baffaa826b85459df0fff47f12317d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1679684072, - "narHash": "sha256-+DYYk9/Ns+njngvkHcmHX9HkALBRulLUIXLm1L44emM=", - "owner": "rycee", - "repo": "nmd", - "rev": "f5a18594255866342ace46827c390c36875337e5", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmd", - "type": "gitlab" - } - }, - "null-ls": { + "plugin-null-ls": { "flake": false, "locked": { "lastModified": 1688652536, @@ -461,7 +461,7 @@ "type": "github" } }, - "nvim-autopairs": { + "plugin-nvim-autopairs": { "flake": false, "locked": { "lastModified": 1689332359, @@ -477,7 +477,7 @@ "type": "github" } }, - "nvim-bufferline-lua": { + "plugin-nvim-bufferline-lua": { "flake": false, "locked": { "lastModified": 1689661992, @@ -494,7 +494,7 @@ "type": "github" } }, - "nvim-cmp": { + "plugin-nvim-cmp": { "flake": false, "locked": { "lastModified": 1688965049, @@ -510,7 +510,7 @@ "type": "github" } }, - "nvim-code-action-menu": { + "plugin-nvim-code-action-menu": { "flake": false, "locked": { "lastModified": 1671523188, @@ -526,7 +526,7 @@ "type": "github" } }, - "nvim-cursorline": { + "plugin-nvim-cursorline": { "flake": false, "locked": { "lastModified": 1650034925, @@ -542,7 +542,23 @@ "type": "github" } }, - "nvim-lightbulb": { + "plugin-nvim-dap": { + "flake": false, + "locked": { + "lastModified": 1690444190, + "narHash": "sha256-OSJA+K8eGj87RWo2tE0kT6bAItGkMMtuR0HB8WEXZ4k=", + "owner": "mfussenegger", + "repo": "nvim-dap", + "rev": "2f28ea843bcdb378b171a66ddcd568516e431d55", + "type": "github" + }, + "original": { + "owner": "mfussenegger", + "repo": "nvim-dap", + "type": "github" + } + }, + "plugin-nvim-lightbulb": { "flake": false, "locked": { "lastModified": 1689887436, @@ -558,7 +574,7 @@ "type": "github" } }, - "nvim-lspconfig": { + "plugin-nvim-lspconfig": { "flake": false, "locked": { "lastModified": 1690356683, @@ -574,14 +590,14 @@ "type": "github" } }, - "nvim-neoclip": { + "plugin-nvim-neoclip": { "flake": false, "locked": { - "lastModified": 1651221055, - "narHash": "sha256-JO5tOk+Sv0YNjk1pHKfzXian7trFrEh/+iwH2ZxO0Ss=", + "lastModified": 1684196333, + "narHash": "sha256-96AwMgyC7PTDEPS5tXwDT3WfK8jJJuIYGE+q+j6U5Uc=", "owner": "AckslD", "repo": "nvim-neoclip.lua", - "rev": "f3ff1645de5d2fd46ac8ffe86e440b7f3ae1fd11", + "rev": "4e406ae0f759262518731538f2585abb9d269bac", "type": "github" }, "original": { @@ -590,7 +606,7 @@ "type": "github" } }, - "nvim-tree-lua": { + "plugin-nvim-tree-lua": { "flake": false, "locked": { "lastModified": 1690096369, @@ -606,7 +622,7 @@ "type": "github" } }, - "nvim-treesitter-context": { + "plugin-nvim-treesitter-context": { "flake": false, "locked": { "lastModified": 1689239188, @@ -622,7 +638,7 @@ "type": "github" } }, - "nvim-ts-autotag": { + "plugin-nvim-ts-autotag": { "flake": false, "locked": { "lastModified": 1686883732, @@ -638,7 +654,7 @@ "type": "github" } }, - "nvim-web-devicons": { + "plugin-nvim-web-devicons": { "flake": false, "locked": { "lastModified": 1689474464, @@ -654,14 +670,14 @@ "type": "github" } }, - "onedark": { + "plugin-onedark": { "flake": false, "locked": { - "lastModified": 1679504944, - "narHash": "sha256-vwrffcwutr1HKKcNz2hGEO46EIJS1Fug17VCuWRNu/o=", + "lastModified": 1689269544, + "narHash": "sha256-HfyYEppo9NFswYlPKnHNOZO5eiTQSORQhWAkzCmM2m4=", "owner": "navarasu", "repo": "onedark.nvim", - "rev": "dd640f6cfb0e370cfd3db389f04b172508848bd3", + "rev": "cae5fdf035ee92c407a29ee2ccfcff503d2be7f1", "type": "github" }, "original": { @@ -670,7 +686,7 @@ "type": "github" } }, - "open-browser": { + "plugin-open-browser": { "flake": false, "locked": { "lastModified": 1665248470, @@ -686,7 +702,7 @@ "type": "github" } }, - "plantuml-previewer": { + "plugin-plantuml-previewer": { "flake": false, "locked": { "lastModified": 1678208089, @@ -702,7 +718,7 @@ "type": "github" } }, - "plantuml-syntax": { + "plugin-plantuml-syntax": { "flake": false, "locked": { "lastModified": 1661550240, @@ -718,7 +734,7 @@ "type": "github" } }, - "plenary-nvim": { + "plugin-plenary-nvim": { "flake": false, "locked": { "lastModified": 1689589150, @@ -734,14 +750,14 @@ "type": "github" } }, - "registers": { + "plugin-registers": { "flake": false, "locked": { - "lastModified": 1650186703, - "narHash": "sha256-kqAcuO/tPO0GHBUwpwQYz7QJCyeTE93CbXnVFK7S8qU=", + "lastModified": 1680595111, + "narHash": "sha256-MeBlcF5LLk6bhIofYuG+0Z2xwc0BVqP85yNCvjH66fw=", "owner": "tversteeg", "repo": "registers.nvim", - "rev": "dfcf0962ce88b52e00dd96dfaabc9997a18f4efe", + "rev": "2ab8372bb837f05fae6b43091f10a0b725d113ca", "type": "github" }, "original": { @@ -750,6 +766,134 @@ "type": "github" } }, + "plugin-rust-tools": { + "flake": false, + "locked": { + "lastModified": 1689033186, + "narHash": "sha256-jtfyDxifchznUupLSao6nmpVqaX1yO0xN+NhqS9fgxg=", + "owner": "simrat39", + "repo": "rust-tools.nvim", + "rev": "0cc8adab23117783a0292a0c8a2fbed1005dc645", + "type": "github" + }, + "original": { + "owner": "simrat39", + "repo": "rust-tools.nvim", + "type": "github" + } + }, + "plugin-sqls-nvim": { + "flake": false, + "locked": { + "lastModified": 1684697500, + "narHash": "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s=", + "owner": "nanotee", + "repo": "sqls.nvim", + "rev": "4b1274b5b44c48ce784aac23747192f5d9d26207", + "type": "github" + }, + "original": { + "owner": "nanotee", + "repo": "sqls.nvim", + "type": "github" + } + }, + "plugin-telescope": { + "flake": false, + "locked": { + "lastModified": 1690442690, + "narHash": "sha256-vecmMzQpCBswU+wyZw4c92xqRPlpH9X3AGXajOs0fic=", + "owner": "nvim-telescope", + "repo": "telescope.nvim", + "rev": "22735947d84d78f29436c203f0a4b8dc15dda204", + "type": "github" + }, + "original": { + "owner": "nvim-telescope", + "repo": "telescope.nvim", + "type": "github" + } + }, + "plugin-todo-comments": { + "flake": false, + "locked": { + "lastModified": 1690569591, + "narHash": "sha256-Qm8AJ8omU5eCfjLt91DVxLS0R3QHbfW55ZTegB1JvWI=", + "owner": "folke", + "repo": "todo-comments.nvim", + "rev": "3094ead8edfa9040de2421deddec55d3762f64d1", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "todo-comments.nvim", + "type": "github" + } + }, + "plugin-tokyonight": { + "flake": false, + "locked": { + "lastModified": 1689285710, + "narHash": "sha256-x26qLaZzg7sJIc1d/5Q/DJ/YvRSc3s87PwPHTPTl+Xk=", + "owner": "folke", + "repo": "tokyonight.nvim", + "rev": "1ee11019f8a81dac989ae1db1a013e3d582e2033", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "tokyonight.nvim", + "type": "github" + } + }, + "plugin-trouble": { + "flake": false, + "locked": { + "lastModified": 1690570389, + "narHash": "sha256-KMqkfHffIIL6A9RcmSEf19fN6yIuXVq+pqGpif4TbKs=", + "owner": "folke", + "repo": "trouble.nvim", + "rev": "ab6dd3ffb7101d4999b6b03f93317ee99ae85fb6", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "trouble.nvim", + "type": "github" + } + }, + "plugin-vim-vsnip": { + "flake": false, + "locked": { + "lastModified": 1678609126, + "narHash": "sha256-ehPnvGle7YrECn76YlSY/2V7Zeq56JGlmZPlwgz2FdE=", + "owner": "hrsh7th", + "repo": "vim-vsnip", + "rev": "7753ba9c10429c29d25abfd11b4c60b76718c438", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "vim-vsnip", + "type": "github" + } + }, + "plugin-which-key": { + "flake": false, + "locked": { + "lastModified": 1690570286, + "narHash": "sha256-B1+EHd2eH/EbD5Kip9PfhdPyyGfIkD6rsx0Z3rXvb5w=", + "owner": "folke", + "repo": "which-key.nvim", + "rev": "7ccf476ebe0445a741b64e36c78a682c1c6118b7", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "which-key.nvim", + "type": "github" + } + }, "rnix-lsp": { "inputs": { "naersk": "naersk", @@ -776,59 +920,60 @@ }, "root": { "inputs": { - "bufdelete-nvim": "bufdelete-nvim", - "catppuccin": "catppuccin", - "cmp-buffer": "cmp-buffer", - "cmp-nvim-lsp": "cmp-nvim-lsp", - "cmp-path": "cmp-path", - "cmp-treesitter": "cmp-treesitter", - "cmp-vsnip": "cmp-vsnip", - "crates-nvim": "crates-nvim", - "dracula": "dracula", - "dracula-nvim": "dracula-nvim", - "fidget": "fidget", "flake-utils": "flake-utils", - "gitsigns-nvim": "gitsigns-nvim", - "glow-nvim": "glow-nvim", - "gruvbox": "gruvbox", - "indent-blankline": "indent-blankline", - "kommentary": "kommentary", - "lsp-signature": "lsp-signature", - "lspkind": "lspkind", - "lspsaga": "lspsaga", - "lualine": "lualine", "nil": "nil", "nixpkgs": "nixpkgs", "nmd": "nmd", - "null-ls": "null-ls", - "nvim-autopairs": "nvim-autopairs", - "nvim-bufferline-lua": "nvim-bufferline-lua", - "nvim-cmp": "nvim-cmp", - "nvim-code-action-menu": "nvim-code-action-menu", - "nvim-cursorline": "nvim-cursorline", - "nvim-lightbulb": "nvim-lightbulb", - "nvim-lspconfig": "nvim-lspconfig", - "nvim-neoclip": "nvim-neoclip", - "nvim-tree-lua": "nvim-tree-lua", - "nvim-treesitter-context": "nvim-treesitter-context", - "nvim-ts-autotag": "nvim-ts-autotag", - "nvim-web-devicons": "nvim-web-devicons", - "onedark": "onedark", - "open-browser": "open-browser", - "plantuml-previewer": "plantuml-previewer", - "plantuml-syntax": "plantuml-syntax", - "plenary-nvim": "plenary-nvim", - "registers": "registers", + "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", + "plugin-catppuccin": "plugin-catppuccin", + "plugin-cmp-buffer": "plugin-cmp-buffer", + "plugin-cmp-nvim-lsp": "plugin-cmp-nvim-lsp", + "plugin-cmp-path": "plugin-cmp-path", + "plugin-cmp-treesitter": "plugin-cmp-treesitter", + "plugin-cmp-vsnip": "plugin-cmp-vsnip", + "plugin-crates-nvim": "plugin-crates-nvim", + "plugin-dracula": "plugin-dracula", + "plugin-dracula-nvim": "plugin-dracula-nvim", + "plugin-fidget": "plugin-fidget", + "plugin-gitsigns-nvim": "plugin-gitsigns-nvim", + "plugin-glow-nvim": "plugin-glow-nvim", + "plugin-gruvbox": "plugin-gruvbox", + "plugin-indent-blankline": "plugin-indent-blankline", + "plugin-kommentary": "plugin-kommentary", + "plugin-lsp-signature": "plugin-lsp-signature", + "plugin-lspkind": "plugin-lspkind", + "plugin-lspsaga": "plugin-lspsaga", + "plugin-lualine": "plugin-lualine", + "plugin-null-ls": "plugin-null-ls", + "plugin-nvim-autopairs": "plugin-nvim-autopairs", + "plugin-nvim-bufferline-lua": "plugin-nvim-bufferline-lua", + "plugin-nvim-cmp": "plugin-nvim-cmp", + "plugin-nvim-code-action-menu": "plugin-nvim-code-action-menu", + "plugin-nvim-cursorline": "plugin-nvim-cursorline", + "plugin-nvim-dap": "plugin-nvim-dap", + "plugin-nvim-lightbulb": "plugin-nvim-lightbulb", + "plugin-nvim-lspconfig": "plugin-nvim-lspconfig", + "plugin-nvim-neoclip": "plugin-nvim-neoclip", + "plugin-nvim-tree-lua": "plugin-nvim-tree-lua", + "plugin-nvim-treesitter-context": "plugin-nvim-treesitter-context", + "plugin-nvim-ts-autotag": "plugin-nvim-ts-autotag", + "plugin-nvim-web-devicons": "plugin-nvim-web-devicons", + "plugin-onedark": "plugin-onedark", + "plugin-open-browser": "plugin-open-browser", + "plugin-plantuml-previewer": "plugin-plantuml-previewer", + "plugin-plantuml-syntax": "plugin-plantuml-syntax", + "plugin-plenary-nvim": "plugin-plenary-nvim", + "plugin-registers": "plugin-registers", + "plugin-rust-tools": "plugin-rust-tools", + "plugin-sqls-nvim": "plugin-sqls-nvim", + "plugin-telescope": "plugin-telescope", + "plugin-todo-comments": "plugin-todo-comments", + "plugin-tokyonight": "plugin-tokyonight", + "plugin-trouble": "plugin-trouble", + "plugin-vim-vsnip": "plugin-vim-vsnip", + "plugin-which-key": "plugin-which-key", "rnix-lsp": "rnix-lsp", - "rust-tools": "rust-tools", - "sqls-nvim": "sqls-nvim", - "telescope": "telescope", - "tidalcycles": "tidalcycles", - "todo-comments": "todo-comments", - "tokyonight": "tokyonight", - "trouble": "trouble", - "vim-vsnip": "vim-vsnip", - "which-key": "which-key" + "tidalcycles": "tidalcycles" } }, "rust-overlay": { @@ -856,38 +1001,6 @@ "type": "github" } }, - "rust-tools": { - "flake": false, - "locked": { - "lastModified": 1689033186, - "narHash": "sha256-jtfyDxifchznUupLSao6nmpVqaX1yO0xN+NhqS9fgxg=", - "owner": "simrat39", - "repo": "rust-tools.nvim", - "rev": "0cc8adab23117783a0292a0c8a2fbed1005dc645", - "type": "github" - }, - "original": { - "owner": "simrat39", - "repo": "rust-tools.nvim", - "type": "github" - } - }, - "sqls-nvim": { - "flake": false, - "locked": { - "lastModified": 1684697500, - "narHash": "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s=", - "owner": "nanotee", - "repo": "sqls.nvim", - "rev": "4b1274b5b44c48ce784aac23747192f5d9d26207", - "type": "github" - }, - "original": { - "owner": "nanotee", - "repo": "sqls.nvim", - "type": "github" - } - }, "superdirt-src": { "flake": false, "locked": { @@ -905,22 +1018,6 @@ "type": "github" } }, - "telescope": { - "flake": false, - "locked": { - "lastModified": 1690442690, - "narHash": "sha256-vecmMzQpCBswU+wyZw4c92xqRPlpH9X3AGXajOs0fic=", - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "rev": "22735947d84d78f29436c203f0a4b8dc15dda204", - "type": "github" - }, - "original": { - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "type": "github" - } - }, "tidal-src": { "flake": false, "locked": { @@ -962,54 +1059,6 @@ "type": "github" } }, - "todo-comments": { - "flake": false, - "locked": { - "lastModified": 1642601933, - "narHash": "sha256-8uj5TxO9XZlSCB4lVRbKRc1IlUEKcBf/4bDviwuxEgs=", - "owner": "folke", - "repo": "todo-comments.nvim", - "rev": "98b1ebf198836bdc226c0562b9f906584e6c400e", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "todo-comments.nvim", - "type": "github" - } - }, - "tokyonight": { - "flake": false, - "locked": { - "lastModified": 1689285710, - "narHash": "sha256-x26qLaZzg7sJIc1d/5Q/DJ/YvRSc3s87PwPHTPTl+Xk=", - "owner": "folke", - "repo": "tokyonight.nvim", - "rev": "1ee11019f8a81dac989ae1db1a013e3d582e2033", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "tokyonight.nvim", - "type": "github" - } - }, - "trouble": { - "flake": false, - "locked": { - "lastModified": 1647585739, - "narHash": "sha256-oUf8YbJ9HmSLN8o2c7CXzCYPu7PwKzvVKNiM9HtHQbQ=", - "owner": "folke", - "repo": "trouble.nvim", - "rev": "691d490cc4eadc430d226fa7d77aaa84e2e0a125", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "trouble.nvim", - "type": "github" - } - }, "utils": { "locked": { "lastModified": 1653893745, @@ -1042,22 +1091,6 @@ "type": "github" } }, - "vim-vsnip": { - "flake": false, - "locked": { - "lastModified": 1678609126, - "narHash": "sha256-ehPnvGle7YrECn76YlSY/2V7Zeq56JGlmZPlwgz2FdE=", - "owner": "hrsh7th", - "repo": "vim-vsnip", - "rev": "7753ba9c10429c29d25abfd11b4c60b76718c438", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "vim-vsnip", - "type": "github" - } - }, "vowel-src": { "flake": false, "locked": { @@ -1074,22 +1107,6 @@ "repo": "vowel", "type": "github" } - }, - "which-key": { - "flake": false, - "locked": { - "lastModified": 1689491189, - "narHash": "sha256-13aa6QQ4hkWQaliQmICTng/nxutCqlzCWzAoOZhERSI=", - "owner": "folke", - "repo": "which-key.nvim", - "rev": "38b990f6eabf62014018b4aae70a97d7a6c2eb88", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "which-key.nvim", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0061167..9558eb2 100644 --- a/flake.nix +++ b/flake.nix @@ -7,176 +7,182 @@ nmd.url = "gitlab:rycee/nmd"; nmd.flake = false; + # Language server (use master instead of nixpkgs) + rnix-lsp.url = "github:nix-community/rnix-lsp"; + rnix-lsp.inputs.nixpkgs.follows = "flake-utils"; + rnix-lsp.inputs.utils.follows = "flake-utils"; + + nil.url = "github:jordanisaacs/nil"; + nil.inputs.nixpkgs.follows = "nixpkgs"; + nil.inputs.flake-utils.follows = "flake-utils"; + + # Tidal cycles + tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; + tidalcycles.inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal"; + + ## Plugins (must begin with plugin-) + # LSP plugins - nvim-lspconfig.url = "github:neovim/nvim-lspconfig"; - nvim-lspconfig.flake = false; + plugin-nvim-lspconfig.url = "github:neovim/nvim-lspconfig"; + plugin-nvim-lspconfig.flake = false; - lspsaga.url = "github:tami5/lspsaga.nvim"; - lspsaga.flake = false; + plugin-lspsaga.url = "github:tami5/lspsaga.nvim"; + plugin-lspsaga.flake = false; - lspkind.url = "github:onsails/lspkind-nvim"; - lspkind.flake = false; + plugin-lspkind.url = "github:onsails/lspkind-nvim"; + plugin-lspkind.flake = false; - trouble.url = "github:folke/trouble.nvim"; - trouble.flake = false; + plugin-trouble.url = "github:folke/trouble.nvim"; + plugin-trouble.flake = false; - nvim-treesitter-context.url = "github:nvim-treesitter/nvim-treesitter-context"; - nvim-treesitter-context.flake = false; + plugin-nvim-treesitter-context.url = "github:nvim-treesitter/nvim-treesitter-context"; + plugin-nvim-treesitter-context.flake = false; - nvim-lightbulb.url = "github:kosayoda/nvim-lightbulb"; - nvim-lightbulb.flake = false; + plugin-nvim-lightbulb.url = "github:kosayoda/nvim-lightbulb"; + plugin-nvim-lightbulb.flake = false; - fidget.url = "github:j-hui/fidget.nvim"; - fidget.flake = false; + plugin-fidget.url = "github:j-hui/fidget.nvim"; + plugin-fidget.flake = false; - nvim-code-action-menu.url = "github:weilbith/nvim-code-action-menu"; - nvim-code-action-menu.flake = false; + plugin-nvim-code-action-menu.url = "github:weilbith/nvim-code-action-menu"; + plugin-nvim-code-action-menu.flake = false; - lsp-signature.url = "github:ray-x/lsp_signature.nvim"; - lsp-signature.flake = false; + plugin-lsp-signature.url = "github:ray-x/lsp_signature.nvim"; + plugin-lsp-signature.flake = false; - null-ls.url = "github:jose-elias-alvarez/null-ls.nvim"; - null-ls.flake = false; + plugin-null-ls.url = "github:jose-elias-alvarez/null-ls.nvim"; + plugin-null-ls.flake = false; - sqls-nvim.url = "github:nanotee/sqls.nvim"; - sqls-nvim.flake = false; + plugin-sqls-nvim.url = "github:nanotee/sqls.nvim"; + plugin-sqls-nvim.flake = false; - rust-tools.url = "github:simrat39/rust-tools.nvim"; - rust-tools.flake = false; + plugin-rust-tools.url = "github:simrat39/rust-tools.nvim"; + plugin-rust-tools.flake = false; + + # Debug + plugin-nvim-dap.url = "github:mfussenegger/nvim-dap"; + plugin-nvim-dap.flake = false; # Copying/Registers - registers.url = "github:tversteeg/registers.nvim"; - registers.flake = false; + plugin-registers.url = "github:tversteeg/registers.nvim"; + plugin-registers.flake = false; - nvim-neoclip.url = "github:AckslD/nvim-neoclip.lua"; - nvim-neoclip.flake = false; + plugin-nvim-neoclip.url = "github:AckslD/nvim-neoclip.lua"; + plugin-nvim-neoclip.flake = false; # Telescope - telescope.url = "github:nvim-telescope/telescope.nvim"; - telescope.flake = false; - - # Langauge server (use master instead of nixpkgs) - rnix-lsp.url = "github:nix-community/rnix-lsp"; - rnix-lsp.inputs.nixpkgs.follows = "flake-utils"; - rnix-lsp.inputs.utils.follows = "flake-utils"; - - nil.url = "github:jordanisaacs/nil"; - nil.inputs.nixpkgs.follows = "nixpkgs"; - nil.inputs.flake-utils.follows = "flake-utils"; + plugin-telescope.url = "github:nvim-telescope/telescope.nvim"; + plugin-telescope.flake = false; # Filetrees - nvim-tree-lua.url = "github:kyazdani42/nvim-tree.lua"; - nvim-tree-lua.flake = false; + plugin-nvim-tree-lua.url = "github:kyazdani42/nvim-tree.lua"; + plugin-nvim-tree-lua.flake = false; # Tablines - nvim-bufferline-lua.url = "github:akinsho/nvim-bufferline.lua?ref=v4.3.0"; - nvim-bufferline-lua.flake = false; + plugin-nvim-bufferline-lua.url = "github:akinsho/nvim-bufferline.lua?ref=v4.3.0"; + plugin-nvim-bufferline-lua.flake = false; # Statuslines - lualine.url = "github:hoob3rt/lualine.nvim"; - lualine.flake = false; + plugin-lualine.url = "github:hoob3rt/lualine.nvim"; + plugin-lualine.flake = false; # Autocompletes - nvim-cmp.url = "github:hrsh7th/nvim-cmp"; - nvim-cmp.flake = false; + plugin-nvim-cmp.url = "github:hrsh7th/nvim-cmp"; + plugin-nvim-cmp.flake = false; - cmp-buffer.url = "github:hrsh7th/cmp-buffer"; - cmp-buffer.flake = false; + plugin-cmp-buffer.url = "github:hrsh7th/cmp-buffer"; + plugin-cmp-buffer.flake = false; - cmp-nvim-lsp.url = "github:hrsh7th/cmp-nvim-lsp"; - cmp-nvim-lsp.flake = false; + plugin-cmp-nvim-lsp.url = "github:hrsh7th/cmp-nvim-lsp"; + plugin-cmp-nvim-lsp.flake = false; - cmp-vsnip.url = "github:hrsh7th/cmp-vsnip"; - cmp-vsnip.flake = false; + plugin-cmp-vsnip.url = "github:hrsh7th/cmp-vsnip"; + plugin-cmp-vsnip.flake = false; - cmp-path.url = "github:hrsh7th/cmp-path"; - cmp-path.flake = false; + plugin-cmp-path.url = "github:hrsh7th/cmp-path"; + plugin-cmp-path.flake = false; - cmp-treesitter.url = "github:ray-x/cmp-treesitter"; - cmp-treesitter.flake = false; + plugin-cmp-treesitter.url = "github:ray-x/cmp-treesitter"; + plugin-cmp-treesitter.flake = false; # snippets - vim-vsnip.url = "github:hrsh7th/vim-vsnip"; - vim-vsnip.flake = false; + plugin-vim-vsnip.url = "github:hrsh7th/vim-vsnip"; + plugin-vim-vsnip.flake = false; # Autopairs - nvim-autopairs.url = "github:windwp/nvim-autopairs"; - nvim-autopairs.flake = false; + plugin-nvim-autopairs.url = "github:windwp/nvim-autopairs"; + plugin-nvim-autopairs.flake = false; - nvim-ts-autotag.url = "github:windwp/nvim-ts-autotag"; - nvim-ts-autotag.flake = false; + plugin-nvim-ts-autotag.url = "github:windwp/nvim-ts-autotag"; + plugin-nvim-ts-autotag.flake = false; # Commenting - kommentary.url = "github:b3nj5m1n/kommentary"; - kommentary.flake = false; + plugin-kommentary.url = "github:b3nj5m1n/kommentary"; + plugin-kommentary.flake = false; - todo-comments.url = "github:folke/todo-comments.nvim"; - todo-comments.flake = false; + plugin-todo-comments.url = "github:folke/todo-comments.nvim"; + plugin-todo-comments.flake = false; # Buffer tools - bufdelete-nvim.url = "github:famiu/bufdelete.nvim"; - bufdelete-nvim.flake = false; + plugin-bufdelete-nvim.url = "github:famiu/bufdelete.nvim"; + plugin-bufdelete-nvim.flake = false; # Themes - tokyonight.url = "github:folke/tokyonight.nvim"; - tokyonight.flake = false; + plugin-tokyonight.url = "github:folke/tokyonight.nvim"; + plugin-tokyonight.flake = false; - onedark.url = "github:navarasu/onedark.nvim"; - onedark.flake = false; + plugin-onedark.url = "github:navarasu/onedark.nvim"; + plugin-onedark.flake = false; - catppuccin.url = "github:catppuccin/nvim"; - catppuccin.flake = false; + plugin-catppuccin.url = "github:catppuccin/nvim"; + plugin-catppuccin.flake = false; - dracula-nvim.url = "github:Mofiqul/dracula.nvim"; - dracula-nvim.flake = false; + plugin-dracula-nvim.url = "github:Mofiqul/dracula.nvim"; + plugin-dracula-nvim.flake = false; - dracula.url = "github:dracula/vim"; - dracula.flake = false; + plugin-dracula.url = "github:dracula/vim"; + plugin-dracula.flake = false; - gruvbox.url = "github:ellisonleao/gruvbox.nvim"; - gruvbox.flake = false; + plugin-gruvbox.url = "github:ellisonleao/gruvbox.nvim"; + plugin-gruvbox.flake = false; # Rust crates - crates-nvim.url = "github:Saecki/crates.nvim"; - crates-nvim.flake = false; + plugin-crates-nvim.url = "github:Saecki/crates.nvim"; + plugin-crates-nvim.flake = false; # Visuals - nvim-cursorline.url = "github:yamatsum/nvim-cursorline"; - nvim-cursorline.flake = false; + plugin-nvim-cursorline.url = "github:yamatsum/nvim-cursorline"; + plugin-nvim-cursorline.flake = false; - indent-blankline.url = "github:lukas-reineke/indent-blankline.nvim"; - indent-blankline.flake = false; + plugin-indent-blankline.url = "github:lukas-reineke/indent-blankline.nvim"; + plugin-indent-blankline.flake = false; - nvim-web-devicons.url = "github:kyazdani42/nvim-web-devicons"; - nvim-web-devicons.flake = false; + plugin-nvim-web-devicons.url = "github:kyazdani42/nvim-web-devicons"; + plugin-nvim-web-devicons.flake = false; - gitsigns-nvim.url = "github:lewis6991/gitsigns.nvim"; - gitsigns-nvim.flake = false; + plugin-gitsigns-nvim.url = "github:lewis6991/gitsigns.nvim"; + plugin-gitsigns-nvim.flake = false; # Key binding help - which-key.url = "github:folke/which-key.nvim"; - which-key.flake = false; + plugin-which-key.url = "github:folke/which-key.nvim"; + plugin-which-key.flake = false; # Markdown - glow-nvim.url = "github:ellisonleao/glow.nvim"; - glow-nvim.flake = false; - - # Tidal cycles - tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; - tidalcycles.inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal"; + plugin-glow-nvim.url = "github:ellisonleao/glow.nvim"; + plugin-glow-nvim.flake = false; # Plenary (required by crates-nvim) - plenary-nvim.url = "github:nvim-lua/plenary.nvim"; - plenary-nvim.flake = false; + plugin-plenary-nvim.url = "github:nvim-lua/plenary.nvim"; + plugin-plenary-nvim.flake = false; - open-browser.url = "github:tyru/open-browser.vim"; - open-browser.flake = false; + plugin-open-browser.url = "github:tyru/open-browser.vim"; + plugin-open-browser.flake = false; - plantuml-syntax.url = "github:aklt/plantuml-syntax"; - plantuml-syntax.flake = false; + plugin-plantuml-syntax.url = "github:aklt/plantuml-syntax"; + plugin-plantuml-syntax.flake = false; - plantuml-previewer.url = "github:weirongxu/plantuml-previewer.vim"; - plantuml-previewer.flake = false; + plugin-plantuml-previewer.url = "github:weirongxu/plantuml-previewer.vim"; + plugin-plantuml-previewer.flake = false; }; outputs = { @@ -184,53 +190,7 @@ flake-utils, ... } @ inputs: let - # Plugin must be same as input name - availablePlugins = [ - "nvim-treesitter-context" - "gitsigns-nvim" - "plenary-nvim" - "nvim-lspconfig" - "lspsaga" - "lspkind" - "nvim-lightbulb" - "fidget" - "lsp-signature" - "nvim-tree-lua" - "nvim-bufferline-lua" - "lualine" - "nvim-autopairs" - "nvim-ts-autotag" - "nvim-web-devicons" - "tokyonight" - "bufdelete-nvim" - "nvim-cmp" - "cmp-nvim-lsp" - "cmp-buffer" - "cmp-vsnip" - "cmp-path" - "cmp-treesitter" - "crates-nvim" - "vim-vsnip" - "nvim-code-action-menu" - "trouble" - "null-ls" - "which-key" - "indent-blankline" - "nvim-cursorline" - "sqls-nvim" - "glow-nvim" - "telescope" - "rust-tools" - "onedark" - "catppuccin" - "dracula" - "dracula-nvim" - "gruvbox" - "open-browser" - "plantuml-syntax" - "plantuml-previewer" - ]; - rawPlugins = nvimLib.plugins.inputsToRaw inputs availablePlugins; + rawPlugins = nvimLib.plugins.fromInputs inputs "plugin-"; neovimConfiguration = {modules ? [], ...} @ args: import ./modules diff --git a/modules/lib/plugins.nix b/modules/lib/plugins.nix index b5a17c8..dae5c89 100644 --- a/modules/lib/plugins.nix +++ b/modules/lib/plugins.nix @@ -1,3 +1,7 @@ -{lib}: { - inputsToRaw = inputs: availablePlugins: lib.genAttrs availablePlugins (n: {src = inputs.${n};}); +{lib}: +with lib; { + fromInputs = inputs: prefix: + mapAttrs' + (n: v: nameValuePair (removePrefix prefix n) {src = v;}) + (filterAttrs (n: _: hasPrefix prefix n) inputs); }